From cfc6ebe11df8c5452d3333bb0c4049ee93dacfb4 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Thu, 22 Jan 2026 21:37:42 +0100 Subject: [PATCH] test(e2e): fix flaky SuperSync undo test with increased timeouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increased timeouts in "Undo task delete syncs restored task to other client" test: - Undo button wait: 5s → 8s (snackbar appearance during load) - Post-undo wait: 500ms → 1500ms (persistence completion) - Task restore verification: 5s → 10s (NgRx state update + render) - Client B verification: 10s → 15s (sync propagation + render) These changes accommodate resource contention during parallel test execution. The test now passes consistently without retries. --- e2e/tests/sync/supersync-edge-cases.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/tests/sync/supersync-edge-cases.spec.ts b/e2e/tests/sync/supersync-edge-cases.spec.ts index 266672751..68f04f61b 100644 --- a/e2e/tests/sync/supersync-edge-cases.spec.ts +++ b/e2e/tests/sync/supersync-edge-cases.spec.ts @@ -639,17 +639,17 @@ test.describe('@supersync SuperSync Edge Cases', () => { const undoButton = clientA.page.locator( 'snack-custom button.action, .mat-mdc-snack-bar-container button', ); - await undoButton.waitFor({ state: 'visible', timeout: 5000 }); + await undoButton.waitFor({ state: 'visible', timeout: 8000 }); await undoButton.click(); - // Wait for undo to complete - await clientA.page.waitForTimeout(500); + // Wait for undo to complete and persist + await clientA.page.waitForTimeout(1500); // Verify task is restored locally on A const restoredTaskA = clientA.page .locator(`task:not(.ng-animating):has-text("${taskName}")`) .first(); - await expect(restoredTaskA).toBeVisible({ timeout: 5000 }); + await expect(restoredTaskA).toBeVisible({ timeout: 10000 }); // 5. Client A syncs await clientA.sync.syncAndWait(); @@ -665,7 +665,7 @@ test.describe('@supersync SuperSync Edge Cases', () => { const taskLocatorB = clientB.page .locator(`task:not(.ng-animating):has-text("${taskName}")`) .first(); - await expect(taskLocatorB).toBeVisible({ timeout: 10000 }); + await expect(taskLocatorB).toBeVisible({ timeout: 15000 }); // Verify both clients have exactly the same task count const countA = await clientA.page.locator(`task:has-text("${taskName}")`).count();