mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
test(e2e): reload page after sync to reflect synced state
In 'should sync task done state' test, Client A needs to reload after syncing to see the changes from Client B. Without reload, the UI still shows the old 'isDone' state even though sync completed.
This commit is contained in:
parent
4ec17b4595
commit
303421978b
2 changed files with 14 additions and 3 deletions
|
|
@ -246,8 +246,12 @@ test.describe('WebDAV Sync Advanced Features', () => {
|
|||
|
||||
// Verify Attachment on B
|
||||
const taskB = pageB.locator('task', { hasText: taskName }).first();
|
||||
await taskB.click();
|
||||
await taskB.locator('.show-additional-info-btn').click({ force: true });
|
||||
await expect(taskB).toBeVisible();
|
||||
|
||||
// Click the attachment button to open the side panel with attachments expanded
|
||||
const attachmentBtnB = taskB.locator('.attachment-btn');
|
||||
await expect(attachmentBtnB).toBeVisible();
|
||||
await attachmentBtnB.click({ force: true });
|
||||
|
||||
await expect(pageB.locator('.attachment-link')).toContainText('Google');
|
||||
|
||||
|
|
|
|||
|
|
@ -276,7 +276,14 @@ test.describe('WebDAV Sync Expansion', () => {
|
|||
await syncPageA.triggerSync();
|
||||
await waitForSync(pageA, syncPageA);
|
||||
|
||||
await expect(taskA).not.toHaveClass(/isDone/);
|
||||
// Reload A to ensure UI reflects synced state
|
||||
await pageA.reload();
|
||||
await waitForAppReady(pageA);
|
||||
await dismissTour(pageA);
|
||||
|
||||
// Re-locate the task after reload
|
||||
const taskAAfterSync = pageA.locator('task', { hasText: taskName }).first();
|
||||
await expect(taskAAfterSync).not.toHaveClass(/isDone/, { timeout: 10000 });
|
||||
|
||||
await contextA.close();
|
||||
await contextB.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue