mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-14 23:07:01 +10:00
dfd2c77bc9
* docs: design e2e test setup Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * docs: plan e2e test implementation Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * test: add playwright e2e scripts Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * test: configure playwright Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * test: add core e2e fixtures and specs Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * ci: run e2e tests on pull requests Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * [autofix.ci] apply automated fixes * test: stabilize e2e suite Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * test: ignore playwright artifacts Co-authored-by: Amruth Pillai <im.amruth@gmail.com> * Update .github/workflows/e2e.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * test: address e2e review feedback Co-authored-by: Amruth Pillai <im.amruth@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
24 lines
902 B
TypeScript
24 lines
902 B
TypeScript
import { createSampleResumeFromDashboard, openSidebarSection } from "../fixtures/resume";
|
|
import { expect, test } from "../fixtures/test";
|
|
|
|
test("creates a sample resume and persists a basics edit", async ({ authPage: page }, testInfo) => {
|
|
await createSampleResumeFromDashboard(page, testInfo);
|
|
|
|
const updatedName = `E2E Edited ${Date.now()}`;
|
|
await openSidebarSection(page, "Basics");
|
|
const savePromise = page.waitForResponse((response) => {
|
|
if (!response.url().includes("/api/rpc")) return false;
|
|
if (response.request().method() !== "POST") return false;
|
|
if (!response.ok()) return false;
|
|
|
|
const body = response.request().postData() ?? "";
|
|
return body.includes(updatedName);
|
|
});
|
|
await page.getByLabel("Name").fill(updatedName);
|
|
await savePromise;
|
|
|
|
await page.reload();
|
|
await openSidebarSection(page, "Basics");
|
|
await expect(page.getByLabel("Name")).toHaveValue(updatedName);
|
|
});
|