test(e2e): suppress onboarding in WebDAV and SuperSync client helpers (#6922)

The previous fix (1cf7cff) added onboarding suppression via addInitScript
to test.fixture.ts, but WebDAV and SuperSync tests create their own
browser contexts via setupSyncClient() and createSimulatedClient() which
don't use that fixture. Without the suppression, onboarding overlays
interfere with sync tests causing timeouts and failures.

https://claude.ai/code/session_01AgeFLhcokw7y2tkTpeQMUz

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Johannes Millan 2026-03-22 23:15:26 +01:00 committed by GitHub
parent fe65d81635
commit beba140d9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View file

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

View file

@ -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) => {