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:
Johannes Millan 2025-12-11 18:39:14 +01:00
parent 4ec17b4595
commit 303421978b
2 changed files with 14 additions and 3 deletions

View file

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

View file

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