Skip to content

Commit e26a85a

Browse files
committed
test(desktop-browser): cover a field painted below its own full-screen container
1 parent b038c1b commit e26a85a

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

‎apps/desktop/src/main/browser-agent/page-functions.test.ts‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,17 @@ describe('combobox typing surfaces', () => {
495495
`
496496
const input = visible(byId<HTMLInputElement>('field'))
497497
register(input)
498-
stackTo([byId('card'), input, byId('shell'), ...page()], () => [byId('shell'), ...page()])
499-
500-
expect(focusElementForTyping(0)).toMatchObject({
501-
focused: true,
502-
coveredBy: 'Shop for your home',
503-
})
498+
// the shell paints below the field, or above it when the field sits at a negative z-index
499+
for (const overField of [
500+
[byId('card'), input, byId('shell'), ...page()],
501+
[byId('card'), byId('shell'), input, ...page()],
502+
]) {
503+
stackTo(overField, () => [byId('shell'), ...page()])
504+
expect(focusElementForTyping(0)).toMatchObject({
505+
focused: true,
506+
coveredBy: 'Shop for your home',
507+
})
508+
}
504509
})
505510

506511
it('refuses a top-page field when no sampled point hits anything', () => {

0 commit comments

Comments
 (0)