mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-18 00:46:45 +00:00
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:
parent
fe65d81635
commit
beba140d9f
2 changed files with 18 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue