mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
fix(e2e): stabilize flaky LWW delete vs update race test
Replace racy :focus selector with explicit visibility wait and focus() call. The original selector failed intermittently because Angular sets focus asynchronously via change detection.
This commit is contained in:
parent
446a051169
commit
305372eb23
1 changed files with 5 additions and 3 deletions
|
|
@ -1333,11 +1333,13 @@ test.describe('@supersync SuperSync LWW Conflict Resolution', () => {
|
|||
const taskLocatorB = clientB.page
|
||||
.locator(`task:not(.ng-animating):has-text("${taskName}")`)
|
||||
.first();
|
||||
await taskLocatorB.waitFor({ state: 'visible', timeout: 5000 });
|
||||
await taskLocatorB.dblclick();
|
||||
const titleInputB = clientB.page.locator(
|
||||
'input.mat-mdc-input-element:focus, textarea:focus',
|
||||
);
|
||||
const titleInputB = clientB.page
|
||||
.locator('input.mat-mdc-input-element, textarea')
|
||||
.first();
|
||||
await titleInputB.waitFor({ state: 'visible', timeout: 5000 });
|
||||
await titleInputB.focus();
|
||||
await titleInputB.fill(`${taskName}-Updated`);
|
||||
await clientB.page.keyboard.press('Enter');
|
||||
await clientB.page.waitForTimeout(300);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue