Files
Reactive-Resume/tests/e2e/specs/public-sharing.spec.ts
T
Cursor Agent 18b3ba1cfb test: stabilize e2e suite
Co-authored-by: Amruth Pillai <im.amruth@gmail.com>
2026-06-20 04:24:31 +00:00

17 lines
743 B
TypeScript

import { createSampleResumeFromDashboard, openSidebarSection } from "../fixtures/resume";
import { expect, test } from "../fixtures/test";
test("publishes a resume and renders it for an anonymous visitor", async ({ browser, authPage: page }, testInfo) => {
await createSampleResumeFromDashboard(page, testInfo);
await openSidebarSection(page, "Sharing", "right");
await page.getByRole("switch", { name: /Allow Public Access/ }).click();
const publicUrl = await page.locator("#sharing-url").inputValue();
expect(publicUrl).toMatch(/\/e2e_/);
const anonymous = await browser.newPage();
await anonymous.goto(publicUrl);
await expect(anonymous.getByRole("button", { name: "Download PDF" })).toBeVisible();
await anonymous.close();
});