diff --git a/e2e/utils/supersync-helpers.ts b/e2e/utils/supersync-helpers.ts index 7c22fd259a..3f90c3d76d 100644 --- a/e2e/utils/supersync-helpers.ts +++ b/e2e/utils/supersync-helpers.ts @@ -217,6 +217,15 @@ export const createSimulatedClient = async ( const page = await context.newPage(); + // Skip onboarding, hints, and example tasks before the app boots. + // This runs before any page JavaScript, so Angular sees the flags immediately. + await page.addInitScript(() => { + localStorage.setItem('SUP_ONBOARDING_PRESET_DONE', 'true'); + localStorage.setItem('SUP_ONBOARDING_HINTS_DONE', 'true'); + localStorage.setItem('SUP_IS_SHOW_TOUR', 'true'); + localStorage.setItem('SUP_EXAMPLE_TASKS_CREATED', 'true'); + }); + // Set up error logging page.on('pageerror', (error) => { console.error(`[Client ${clientName}] Page error:`, error.message); diff --git a/e2e/utils/sync-helpers.ts b/e2e/utils/sync-helpers.ts index 6b9179b84a..e938432f4c 100644 --- a/e2e/utils/sync-helpers.ts +++ b/e2e/utils/sync-helpers.ts @@ -100,6 +100,15 @@ export const setupSyncClient = async ( const context = await browser.newContext({ baseURL }); const page = await context.newPage(); + // Skip onboarding, hints, and example tasks before the app boots. + // This runs before any page JavaScript, so Angular sees the flags immediately. + await page.addInitScript(() => { + localStorage.setItem('SUP_ONBOARDING_PRESET_DONE', 'true'); + localStorage.setItem('SUP_ONBOARDING_HINTS_DONE', 'true'); + localStorage.setItem('SUP_IS_SHOW_TOUR', 'true'); + localStorage.setItem('SUP_EXAMPLE_TASKS_CREATED', 'true'); + }); + // Auto-accept confirm dialogs for fresh client sync // This handles the window.confirm() call in OperationLogSyncService._showFreshClientSyncConfirmation page.on('dialog', async (dialog) => {