2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-23 03:54:04 +03:00
Files
vue-select/tests/unit/InternationalText.spec.js
Jeff Sagal c54c398c56 fix tests
2021-08-01 13:15:23 -07:00

32 lines
976 B
JavaScript

import { mountDefault } from '../helpers'
describe('International Text', () => {
it('renders default text for spinner.text', () => {
const Select = mountDefault({ loading: true })
expect(Select.find('.vs__spinner').text()).toBe('Loading...')
})
it('renders default text for noOptions.text', async () => {
const Select = mountDefault({ options: [] })
Select.vm.open = true
await Select.vm.$nextTick()
expect(Select.find('.vs__no-options').text()).toBe(
'Sorry, no matching options.'
)
})
it('renders default text for search.ariaLabel', () => {
const Select = mountDefault()
expect(Select.find('[role="combobox"]').attributes()['aria-label']).toBe(
'Search for options'
)
})
it('renders default text for deselect.ariaLabel', () => {
const Select = mountDefault({ value: 'one', multiple: true })
expect(Select.find('.vs__deselect').attributes()['aria-label']).toBe(
'Deselect one'
)
})
})