diff --git a/e2e/tests/sync/supersync-daily-summary.spec.ts b/e2e/tests/sync/supersync-daily-summary.spec.ts index 55f33377a8..e45bfbbad3 100644 --- a/e2e/tests/sync/supersync-daily-summary.spec.ts +++ b/e2e/tests/sync/supersync-daily-summary.spec.ts @@ -115,8 +115,9 @@ test.describe('@supersync Daily Summary Sync', () => { await saveAndGoHomeBtn.click(); // Wait for Work View (Archived) - // Accept either active/tasks or tag/TODAY (with or without /tasks suffix) - await clientA.page.waitForURL(/(active\/tasks|tag\/TODAY)/); + // Use negative lookahead so we don't match the CURRENT /daily-summary URL — + // /(active\/tasks|tag\/TODAY)/ would match tag/TODAY/daily-summary immediately. + await clientA.page.waitForURL(/(active\/tasks|tag\/TODAY(?!\/daily-summary))/); console.log('Client A archived tasks.'); // Sync A (upload archive) @@ -236,7 +237,8 @@ test.describe('@supersync Daily Summary Sync', () => { await saveAndGoHomeBtn.click(); // Wait for navigation back to work view - await client.page.waitForURL(/(active\/tasks|tag\/TODAY)/); + // Use negative lookahead so we don't match the CURRENT /daily-summary URL. + await client.page.waitForURL(/(active\/tasks|tag\/TODAY(?!\/daily-summary))/); // Wait a moment for any async effects to complete await client.page.waitForTimeout(1000); diff --git a/e2e/utils/supersync-helpers.ts b/e2e/utils/supersync-helpers.ts index 09a9e2dbe1..f824347100 100644 --- a/e2e/utils/supersync-helpers.ts +++ b/e2e/utils/supersync-helpers.ts @@ -883,8 +883,11 @@ export const archiveDoneTasks = async (client: SimulatedE2EClient): Promise