import { beVisible, haveClasses, haveFocus, html, notBeVisible, notHaveClasses, test } from '../../../utils'
test('can use tabs to toggle panels',
[html`
First Panel
Second Panel
`],
({ get }) => {
get('[panel-1]').should(beVisible())
get('[panel-2]').should(notBeVisible())
get('[button-2]').click()
get('[panel-1]').should(notBeVisible())
get('[panel-2]').should(beVisible())
},
)
test('can use arrow keys to cycle through tabs',
[html`
First Panel
Second Panel
`],
({ get }) => {
get('[panel-1]').should(beVisible())
get('[panel-2]').should(notBeVisible())
get('[button-2]').click()
get('[button-2]').should(haveFocus())
get('[panel-1]').should(notBeVisible())
get('[panel-2]').should(beVisible())
get('[button-2]').type('{rightArrow}')
get('[button-1]').should(haveFocus())
get('[panel-1]').should(beVisible())
get('[panel-2]').should(notBeVisible())
get('[button-1]').type('{rightArrow}')
get('[button-2]').should(haveFocus())
get('[panel-1]').should(notBeVisible())
get('[panel-2]').should(beVisible())
},
)
test('cant tab through tabs, can only use arrows',
[html`