+ {post.frontmatter.title}
+ {post.frontmatter.description}
+ {updatedLabel ? (
+
+ {post.frontmatter.author}
+ {updatedLabel}
+
+ ) : null}
+
+ ),
+}));
+
+async function renderPressPage() {
+ const page = messages.pages.press;
+ const ui = await LegalDocumentPage({
+ slug: "press",
+ path: legalPathForSlug("press"),
+ page,
+ });
+ return render(ui);
+}
+
+describe("press page", () => {
+ test("holds embargoed press materials, a contact, and the story", async () => {
+ await renderPressPage();
+ const page = messages.pages.press;
+
+ expect(screen.getByTestId("content-banner")).toHaveAttribute(
+ "data-variant",
+ "guide",
+ );
+ expect(
+ screen.getByRole("heading", { level: 1, name: page.banner.title }),
+ ).toBeInTheDocument();
+ expect(screen.getByText(page.banner.description)).toBeInTheDocument();
+ expect(
+ screen.getByText(/when the embargo lifts/),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByRole("heading", { level: 2, name: "Contact" }),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByRole("heading", { level: 2, name: "The story" }),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByRole("heading", { level: 2, name: "Does CommunityRule use AI?" }),
+ ).toBeInTheDocument();
+ expect(
+ screen.getAllByRole("link", { name: "medlab@colorado.edu" })[0],
+ ).toHaveAttribute("href", "mailto:medlab@colorado.edu");
+ expect(
+ screen.getByRole("link", { name: "Email the press contact" }),
+ ).toHaveAttribute("href", "mailto:medlab@colorado.edu");
+ expect(screen.getByText(/CC BY-SA 4.0/)).toBeInTheDocument();
+ });
+});
diff --git a/tests/unit/legalSyntheticPost.test.ts b/tests/unit/legalSyntheticPost.test.ts
index 87a0036..3f7787f 100644
--- a/tests/unit/legalSyntheticPost.test.ts
+++ b/tests/unit/legalSyntheticPost.test.ts
@@ -10,6 +10,7 @@ describe("legalSyntheticPost", () => {
expect(legalPathForSlug("terms")).toBe("/terms");
expect(legalPathForSlug("cookies")).toBe("/cookies");
expect(legalPathForSlug("kit")).toBe("/kit");
+ expect(legalPathForSlug("press")).toBe("/press");
});
it("builds a guide-shaped post from page messages", () => {
diff --git a/tests/unit/publicSitemap.test.ts b/tests/unit/publicSitemap.test.ts
index 21b254b..6e1da48 100644
--- a/tests/unit/publicSitemap.test.ts
+++ b/tests/unit/publicSitemap.test.ts
@@ -17,6 +17,7 @@ describe("buildPublicSitemap", () => {
expect(urls).not.toContain(sitemapUrl("/use-cases"));
expect(urls).toContain(sitemapUrl("/how-it-works"));
expect(urls).toContain(sitemapUrl("/kit"));
+ expect(urls).toContain(sitemapUrl("/press"));
expect(urls).toContain(sitemapUrl("/privacy"));
expect(urls).toContain(sitemapUrl("/terms"));
expect(urls).toContain(sitemapUrl("/cookies"));