From d7aa59bf4c56c010f4072afc58571492166cf3d2 Mon Sep 17 00:00:00 2001 From: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 Date: Tue, 4 Aug 2026 16:58:25 -0400 Subject: [PATCH] fix(desktop): widen post-Enter timeouts in empty-edit-delete spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The empty-edit-delete tests wait for either an alertdialog (empty-edit path) or edit-target to hide (non-empty edit path) after pressing Enter. Both transitions go through the React state update pipeline, which runs synchronously in isolation but can lag in a loaded shard under CI headless conditions. PR #4694 added huddle-transcription.spec.ts (477 lines, 22+ tests) to shard 2, shifting its composition so empty-edit-delete now runs after more accumulated browser state. The 5s timeouts became insufficient — the non-empty test failed 3/3 times in CI with edit-target still visible. Increase the three post-Enter wait timeouts from 5_000 to 10_000 to match the 10s pattern used elsewhere in the suite for slow-rendering assertions. No product logic is changed; this is a test-only fix. Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- desktop/tests/e2e/empty-edit-delete.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/tests/e2e/empty-edit-delete.spec.ts b/desktop/tests/e2e/empty-edit-delete.spec.ts index 772506571b..23a890ee29 100644 --- a/desktop/tests/e2e/empty-edit-delete.spec.ts +++ b/desktop/tests/e2e/empty-edit-delete.spec.ts @@ -59,7 +59,7 @@ test("clearing an edit to empty prompts to delete, then deletes on confirm", asy // The same "Delete message?" confirmation the Delete menu action shows — an // empty edit is routed through it, not silently deleted. const dialog = page.getByRole("alertdialog"); - await expect(dialog).toBeVisible({ timeout: 5_000 }); + await expect(dialog).toBeVisible({ timeout: 10_000 }); await expect(dialog).toContainText("Delete message?"); // Edit mode stays active while the dialog is open — it exits only on confirm. await expect(page.getByTestId("edit-target")).toBeVisible(); @@ -78,7 +78,7 @@ test("cancelling the empty-edit delete keeps the message", async ({ page }) => { await submitEmptyEdit(page, OWN_MESSAGE_ID); const dialog = page.getByRole("alertdialog"); - await expect(dialog).toBeVisible({ timeout: 5_000 }); + await expect(dialog).toBeVisible({ timeout: 10_000 }); // Cancel → nothing is deleted, the original message survives, and the user is // left in edit mode (the editing session is preserved, not discarded). @@ -109,7 +109,7 @@ test("a non-empty edit still edits and never deletes", async ({ page }) => { // No delete confirmation, edit mode exits, the row survives with new text. await expect(page.getByRole("alertdialog")).toHaveCount(0); - await expect(page.getByTestId("edit-target")).toBeHidden({ timeout: 5_000 }); + await expect(page.getByTestId("edit-target")).toBeHidden({ timeout: 10_000 }); await expect(row).toBeVisible(); await expect(page.getByTestId("message-timeline")).toContainText( editedContent,