mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
fix(e2e): dismiss welcome tour in archive sync test
The test was failing because the Welcome tour dialog was blocking the "Finish Day" button click. Added dismissTourIfVisible() helper before archiving operations to prevent this. Also updated operation-applier.service.ts to remove the yield after dispatching remoteArchiveDataApplied since the effect that listened to this action has been disabled. Current status: - Test progresses past both clients archiving successfully - Tour dialog no longer blocks UI interactions - Still investigating timeout at final state verification
This commit is contained in:
parent
a500f98f14
commit
90bdfe54e1
2 changed files with 7 additions and 3 deletions
|
|
@ -13,6 +13,7 @@ import {
|
|||
generateSyncFolderName,
|
||||
waitForArchivePersistence,
|
||||
} from '../../utils/sync-helpers';
|
||||
import { dismissTourIfVisible } from '../../utils/tour-helpers';
|
||||
|
||||
/**
|
||||
* WebDAV Archive Sync E2E Tests
|
||||
|
|
@ -30,6 +31,9 @@ import {
|
|||
* Adapted from supersync-archive-subtasks.spec.ts
|
||||
*/
|
||||
const archiveDoneTasks = async (page: Page): Promise<void> => {
|
||||
// Dismiss any tour dialogs that might block the finish day button
|
||||
await dismissTourIfVisible(page);
|
||||
|
||||
// Click finish day button
|
||||
const finishDayBtn = page.locator('.e2e-finish-day');
|
||||
await finishDayBtn.waitFor({ state: 'visible', timeout: 10000 });
|
||||
|
|
|
|||
|
|
@ -100,11 +100,11 @@ export class OperationApplierService {
|
|||
return archiveResult;
|
||||
}
|
||||
|
||||
// Trigger archive reload for UI if archive-affecting operations were applied
|
||||
// Dispatch action to signal archive data was applied (for potential future use)
|
||||
// Note: The refreshWorklogAfterRemoteArchiveOps effect that used to listen to
|
||||
// this action is now disabled to prevent UI freezes during bulk archive sync.
|
||||
if (archiveResult.hadArchiveAffectingOp) {
|
||||
this.store.dispatch(remoteArchiveDataApplied());
|
||||
// Yield to let the remoteArchiveDataApplied effect run (refreshWorklog)
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue