Keep draft notes off the How it works guide, link the conflict article, and print only the rule card.

This commit is contained in:
adilallo committed 2026-11-12 18:06:41 -07:00
1 parent 453139c783
commit 95f7291c45
7 files changed
+136 -61

No files matched your search

+15 -2
View File
@@ -3,7 +3,10 @@ import { screen, waitFor } from "@testing-library/react";
import { renderWithProviders as render } from "../utils/test-utils";
import HowItWorksPage from "../../app/(marketing)/how-it-works/page";
import messages from "../../messages/en/index";
import { howItWorksReadMinutes } from "../../lib/howItWorksGuide";
import {
formatHowItWorksByline,
howItWorksReadMinutes,
} from "../../lib/howItWorksGuide";
vi.mock("next/dynamic", () => ({
default: (importFn) => {
@@ -78,10 +81,20 @@ describe("HowItWorksPage", () => {
).toHaveAttribute("href", "#before-you-start");
expect(
screen.getByText(
`By ${page.banner.author}. 18 February 2027. ${howItWorksReadMinutes(page)} minute read.`,
formatHowItWorksByline(page, howItWorksReadMinutes(page)).trim(),
{ exact: false },
),
).toBeInTheDocument();
expect(
screen.getByRole("link", { name: "Resolving Active Conflicts" }),
).toHaveAttribute("href", "/blog/resolving-active-conflicts");
expect(screen.queryByText(/\[Confirm how long/)).not.toBeInTheDocument();
expect(
screen.queryByText(/Dated entries from groups/),
).not.toBeInTheDocument();
expect(
screen.queryByRole("heading", { name: "Updates from groups" }),
).not.toBeInTheDocument();
await waitFor(() => {
expect(screen.getByTestId("related-articles")).toBeInTheDocument();