mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +00:00
fix(e2e): accept overwrite confirmation in provider-switch conflict test
Since #8785, a fresh client with no last-synced baseline gets an OVERWRITE_WARNING_UNKNOWN confirmation after clicking Keep remote. The test never accepted it, so the confirm backdrop blocked the later triggerSync() click and timed out. Accept the confirmation, mirroring the sibling webdav conflict tests.
This commit is contained in:
parent
05f6bd27d1
commit
b7839e9615
1 changed files with 13 additions and 0 deletions
|
|
@ -634,6 +634,19 @@ test.describe('@webdav WebDAV Provider Switch', () => {
|
|||
if (conflictVisible) {
|
||||
const keepRemoteBtn = conflictDialog.locator('button', { hasText: /Keep remote/i });
|
||||
await keepRemoteBtn.click();
|
||||
|
||||
// A fresh client with no last-synced baseline now gets an overwrite
|
||||
// confirmation (getChangeCount → null ⇒ shouldConfirmOverwrite, since #8785).
|
||||
// Accept it — this is the "when user accepts confirmation" the test name
|
||||
// describes. The confirmation is optional, so tolerate its absence.
|
||||
const confirmDialog = pageB.locator('dialog-confirm');
|
||||
try {
|
||||
await confirmDialog.waitFor({ state: 'visible', timeout: 3000 });
|
||||
await confirmDialog.locator('[e2e="confirmBtn"]').click();
|
||||
} catch {
|
||||
// No confirmation shown — fine.
|
||||
}
|
||||
|
||||
// Wait for dialog to close
|
||||
await conflictDialog.waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue