test(e2e): fix flaky SuperSync undo test with increased timeouts

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.
This commit is contained in:
Johannes Millan 2026-01-22 21:37:42 +01:00
parent 851055b4a3
commit cfc6ebe11d

View file

@ -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();