1) e2e/browser-page-dialogs.spec.ts:46:1 › page dialogs wait for the user on their page and stay automatic for the agent › Escape keeps the draft and returns typing to the page
Error: expect(locator).toBeFocused() failed
Locator: getByRole('button', { name: 'Stay', exact: true })
Expected: focused
Received: inactive
Timeout: 5000ms
Call log:
- Expect "toBeFocused" with timeout 5000ms
- waiting for getByRole('button', { name: 'Stay', exact: true })
12 × locator resolved to <button type="button" data-chip-modal-dismiss-action="" data-chip-modal-default-action="" class="group cursor-pointer h-[30px] items-center gap-1.5 px-2 text-left text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-60 max-md:pointer-coarse:min-h-11 max-md:pointer-coarse:min-w-11 rounded-lg inline-flex hover-hover:bg-[var(--surface-hover)] focus-visible:bg-[var(--surface-hover)]">…</button>
- unexpected value "inactive"
433 | await userInput('#draft')
434 | await panelAction({ action: 'reload' })
> 435 | await expect(shell.getByRole('button', { name: 'Stay', exact: true })).toBeFocused()
| ^
436 | await shell.getByRole('dialog').screenshot({
437 | path: test.info().outputPath('leave-page-modal.png'),
438 | animations: 'allow',
at /Users/runner/work/sim/sim/apps/desktop/e2e/browser-page-dialogs.spec.ts:435:78
at check (/Users/runner/work/sim/sim/apps/desktop/e2e/browser-page-dialogs.spec.ts:59:7)
at /Users/runner/work/sim/sim/apps/desktop/e2e/browser-page-dialogs.spec.ts:432:5