mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
adapt unit tests regarding locales
This commit is contained in:
parent
bfbbd26a57
commit
177fb4b14c
@ -94,11 +94,11 @@ describe('LanguageSwitch', () => {
|
||||
describe('navigator language is "nl-NL"', () => {
|
||||
const languageGetter = jest.spyOn(navigator, 'language', 'get')
|
||||
|
||||
it('shows Dutch as language ', async () => {
|
||||
it('shows Nederlands as language ', async () => {
|
||||
languageGetter.mockReturnValue('nl-NL')
|
||||
wrapper.vm.setCurrentLanguage()
|
||||
await wrapper.vm.$nextTick()
|
||||
expect(wrapper.find('button.dropdown-toggle').text()).toBe('Holandés - nl')
|
||||
expect(wrapper.find('button.dropdown-toggle').text()).toBe('Nederlands - nl')
|
||||
})
|
||||
})
|
||||
|
||||
@ -153,11 +153,11 @@ describe('LanguageSwitch', () => {
|
||||
})
|
||||
|
||||
describe('language "nl" in store', () => {
|
||||
it('shows Dutch as language', async () => {
|
||||
it('shows Nederlands as language', async () => {
|
||||
wrapper.vm.$store.state.language = 'nl'
|
||||
wrapper.vm.setCurrentLanguage()
|
||||
await wrapper.vm.$nextTick()
|
||||
expect(wrapper.find('button.dropdown-toggle').text()).toBe('Holandés - nl')
|
||||
expect(wrapper.find('button.dropdown-toggle').text()).toBe('Nederlands - nl')
|
||||
})
|
||||
})
|
||||
|
||||
@ -182,8 +182,8 @@ describe('LanguageSwitch', () => {
|
||||
expect(wrapper.findAll('li').at(3).text()).toBe('Français')
|
||||
})
|
||||
|
||||
it('has Dutch as second language to choose', () => {
|
||||
expect(wrapper.findAll('li').at(4).text()).toBe('Holandés')
|
||||
it('has Nederlands as second language to choose', () => {
|
||||
expect(wrapper.findAll('li').at(4).text()).toBe('Nederlands')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -86,11 +86,11 @@ describe('LanguageSwitch', () => {
|
||||
})
|
||||
describe('navigator language is "nl-NL"', () => {
|
||||
const languageGetter = jest.spyOn(navigator, 'language', 'get')
|
||||
it('shows Dutch as language ', async () => {
|
||||
it('shows Nederlands as language ', async () => {
|
||||
languageGetter.mockReturnValue('nl-NL')
|
||||
wrapper.vm.setCurrentLanguage()
|
||||
await wrapper.vm.$nextTick()
|
||||
expect(wrapper.findAll('span.locales').at(4).text()).toBe('Holandés')
|
||||
expect(wrapper.findAll('span.locales').at(4).text()).toBe('Nederlands')
|
||||
})
|
||||
})
|
||||
describe('navigator language is "it-IT" (not supported)', () => {
|
||||
@ -137,7 +137,7 @@ describe('LanguageSwitch', () => {
|
||||
})
|
||||
})
|
||||
describe('language "nl" in store', () => {
|
||||
it('shows Dutch as language', async () => {
|
||||
it('shows Nederlands as language', async () => {
|
||||
wrapper.vm.$store.state.language = 'nl'
|
||||
wrapper.vm.setCurrentLanguage()
|
||||
await wrapper.vm.$nextTick()
|
||||
@ -149,7 +149,7 @@ describe('LanguageSwitch', () => {
|
||||
expect(wrapper.findAll('span.locales')).toHaveLength(5)
|
||||
})
|
||||
it('has English as first language to choose', () => {
|
||||
expect(wrapper.findAll('span.locales').at(0).text()).toBe('Holandés')
|
||||
expect(wrapper.findAll('span.locales').at(0).text()).toBe('Nederlands')
|
||||
})
|
||||
it('has German as second language to choose', () => {
|
||||
expect(wrapper.findAll('span.locales').at(1).text()).toBe('English')
|
||||
@ -160,7 +160,7 @@ describe('LanguageSwitch', () => {
|
||||
it('has French as third language to choose', () => {
|
||||
expect(wrapper.findAll('span.locales').at(3).text()).toBe('Español')
|
||||
})
|
||||
it('has Dutch as third language to choose', () => {
|
||||
it('has Nederlands as third language to choose', () => {
|
||||
expect(wrapper.findAll('span.locales').at(4).text()).toBe('Français')
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user