Skip to content

Commit

Permalink
chore: focusTrap option removed
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Sep 14, 2022
1 parent 5fb876e commit f95529e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/sanity/src/form/inputs/BooleanInput.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('Keyboard accessibility', () => {
})

const input = result.container.querySelector('input[id="booleanTest"]')
userEvent.tab({focusTrap: result.container})
userEvent.tab()
expect(input).toHaveFocus()
expect(onFocus).toBeCalled()
})
Expand All @@ -108,7 +108,7 @@ describe('Keyboard accessibility', () => {
render: (inputProps) => <BooleanInput {...inputProps} />,
})

userEvent.tab({focusTrap: result.container})
userEvent.tab()
userEvent.keyboard('{space}')
expect(onChange).toBeCalled()
})
Expand All @@ -120,7 +120,7 @@ describe('Keyboard accessibility', () => {
})

const input = result.container.querySelector('input[id="booleanTest"]')
userEvent.tab({focusTrap: result.container})
userEvent.tab()
userEvent.tab()
expect(input).not.toHaveFocus()

Expand Down Expand Up @@ -166,7 +166,7 @@ describe('readOnly property', () => {
expect(onChange).not.toBeCalled()

// Keyboard event
userEvent.tab({focusTrap: result.container})
userEvent.tab()
expect(input).not.toHaveFocus()
})

Expand All @@ -185,7 +185,7 @@ describe('readOnly property', () => {

// Keyboard event
userEvent.tab({shift: true})
userEvent.tab({focusTrap: result.container})
userEvent.tab()
userEvent.keyboard('{space}')
expect(onChange).toBeCalled()
})
Expand All @@ -205,7 +205,7 @@ describe('readOnly property', () => {
expect(onChange).not.toBeCalled()

// Keyboard event
userEvent.tab({focusTrap: result.container})
userEvent.tab()
expect(input).not.toHaveFocus()
})
})

0 comments on commit f95529e

Please sign in to comment.