From 614a1ff9dff3863b585e702fccd2ac69eb958f64 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 7 Sep 2026 23:06:19 +0200 Subject: [PATCH] test: wait for recovery state persistence --- tests/e2e/specs/section-recovery.spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/e2e/specs/section-recovery.spec.ts b/tests/e2e/specs/section-recovery.spec.ts index 0b5a26e10..bbfa44daf 100644 --- a/tests/e2e/specs/section-recovery.spec.ts +++ b/tests/e2e/specs/section-recovery.spec.ts @@ -184,9 +184,14 @@ test("recovers hidden printable sections without changing authored placement", a await page.getByRole("button", { name: "Redo", exact: true }).click(); await expect(page.getByRole("button", { name: "Show Recovery Custom section" })).toHaveCount(0); - const saved = waitForResumeSave(page); await page.getByRole("button", { name: "Undo", exact: true }).click(); - await saved; + await expect + .poll( + async () => + (await readRecoveryState(resumeId)).customSections.find((section) => section.title === "Recovery Custom") + ?.hidden, + ) + .toBe(true); await openResumeCardMenu(page, resumeName); const locked = page.waitForResponse((response) => (response.request().postData() ?? "").includes('"isLocked":true')); await page.getByRole("menuitem", { name: "Lock" }).click();