chore: integrate improve-integration

This commit is contained in:
Amruth Pillai
2026-07-08 19:07:05 +02:00
parent 73daf22b2f
commit 90105cb148
139 changed files with 6054 additions and 7793 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ export async function openSidebarSection(page: Page, title: string) {
await expect(page.getByRole("heading", { name: title, exact: true }).filter({ visible: true }).first()).toBeVisible();
}
export async function openResumeCardMenu(page: Page, resumeName: string) {
await page.goto("/dashboard/resumes");
export async function openResumeCardMenu(page: Page, resumeName: string, { reload = true } = {}) {
if (reload) await page.goto("/dashboard/resumes");
const resumeLink = page.getByRole("link", { name: new RegExp(resumeName) });
await expect(resumeLink).toBeVisible();
await resumeLink.click({ button: "right" });
+2 -2
View File
@@ -14,7 +14,7 @@ test("renames, duplicates and deletes a resume from the dashboard", async ({ aut
await expect(page.getByRole("link", { name: new RegExp(renamedTo) })).toBeVisible();
// Duplicate — the copy defaults to "<name> (Copy)"
await openResumeCardMenu(page, renamedTo);
await openResumeCardMenu(page, renamedTo, { reload: false });
await page.getByRole("menuitem", { name: "Duplicate" }).click();
const duplicateDialog = page.getByRole("dialog", { name: "Duplicate Resume" });
await duplicateDialog.getByRole("button", { name: "Duplicate" }).click();
@@ -22,7 +22,7 @@ test("renames, duplicates and deletes a resume from the dashboard", async ({ aut
await expect(copyLink).toBeVisible();
// Delete the copy and verify it disappears while the original stays
await openResumeCardMenu(page, `${renamedTo} \\(Copy\\)`);
await openResumeCardMenu(page, `${renamedTo} \\(Copy\\)`, { reload: false });
await page.getByRole("menuitem", { name: "Delete" }).click();
await page.getByRole("alertdialog").getByRole("button", { name: "Confirm" }).click();
await expect(copyLink).toBeHidden();