Skip to content

Commit

Permalink
fix: modify test because of changed default aria label
Browse files Browse the repository at this point in the history
  • Loading branch information
Silje Christensen authored and siljec committed Aug 30, 2023
1 parent 2f06c7e commit ec7579f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/wModal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ describe('modal', () => {
const defaultSlot = '<h1>Hello Warp</h1>'
const wrapper = mount(wModal, { props: { modelValue: true }, slots: { default: defaultSlot } })
await nextTick()
const left = wrapper.find('button[aria-label="Tilbake"]').exists()
const left = wrapper.find('button[aria-label="Back"]').exists()
assert.notOk(left)
const right = wrapper.find('button[aria-label="Lukk"]').exists()
const right = wrapper.find('button[aria-label="Close"]').exists()
assert.notOk(right)
})
test('has sane defaults for left and right', async () => {
const defaultSlot = '<h1>Hello Warp</h1>'
const wrapper = mount(wModal, { props: { modelValue: true, left: true, right: true }, slots: { default: defaultSlot } })
await nextTick()
const left = wrapper.find('button[aria-label="Tilbake"]')
const left = wrapper.find('button[aria-label="Back"]')
assert.ok(left.exists())
assert.include(left.html(), '<svg ')
const right = wrapper.find('button[aria-label="Lukk"]')
const right = wrapper.find('button[aria-label="Close"]')
assert.ok(right.exists())
assert.include(right.html(), '<svg ')
})
Expand Down

0 comments on commit ec7579f

Please sign in to comment.