diff --git a/frontend/src/components/GddTransactionList.spec.js b/frontend/src/components/GddTransactionList.spec.js index ab8f3658c..379e1144e 100644 --- a/frontend/src/components/GddTransactionList.spec.js +++ b/frontend/src/components/GddTransactionList.spec.js @@ -440,7 +440,7 @@ describe('GddTransactionList', () => { }) it('shows the text "1 / 2"', () => { - expect(paginationButtons.find('p.text-center').text()).toBe('1 / 2') + expect(paginationButtons.find('p.text-center').text()).toBe('1 math.div 2') }) it('emits update-transactions when next button is clicked', async () => { @@ -452,7 +452,7 @@ describe('GddTransactionList', () => { it('shows text "2 / 2" when next button is clicked', async () => { await paginationButtons.find('button.next-page').trigger('click') - expect(paginationButtons.find('p.text-center').text()).toBe('2 / 2') + expect(paginationButtons.find('p.text-center').text()).toBe('2 math.div 2') }) it('has next-button disabled when next button is clicked', async () => { diff --git a/frontend/src/components/PaginationButtons.spec.js b/frontend/src/components/PaginationButtons.spec.js index c6ae816cc..f2badd082 100644 --- a/frontend/src/components/PaginationButtons.spec.js +++ b/frontend/src/components/PaginationButtons.spec.js @@ -12,8 +12,12 @@ const propsData = { describe('PaginationButtons', () => { let wrapper + const mocks = { + $t: jest.fn((t) => t), + } + const Wrapper = () => { - return mount(PaginationButtons, { localVue, propsData }) + return mount(PaginationButtons, { localVue, mocks, propsData }) } describe('mount', () => { diff --git a/frontend/src/components/Status.spec.js b/frontend/src/components/Status.spec.js index 30dab4345..1dbb05493 100644 --- a/frontend/src/components/Status.spec.js +++ b/frontend/src/components/Status.spec.js @@ -7,6 +7,7 @@ describe('Status', () => { let wrapper const mocks = { + $t: jest.fn((t) => t), $n: jest.fn((n) => n), } @@ -26,7 +27,7 @@ describe('Status', () => { describe('balance is pending', () => { it('it displays an en-dash', () => { - expect(wrapper.find('div.gdd-status-div').text()).toEqual('— GDD') + expect(wrapper.find('div.gdd-status-div').text()).toEqual('dash GDD') }) }) diff --git a/frontend/src/layouts/ContentFooter.spec.js b/frontend/src/layouts/ContentFooter.spec.js index 8d78f2f94..7534fe51a 100644 --- a/frontend/src/layouts/ContentFooter.spec.js +++ b/frontend/src/layouts/ContentFooter.spec.js @@ -37,7 +37,7 @@ describe('ContentFooter', () => { }) it('renders a link to Gradido-Akademie', () => { - expect(wrapper.find('div.copyright').find('a').text()).toEqual('Gradido-Akademie') + expect(wrapper.find('div.copyright').find('a').text()).toEqual('footer.copyright.link') }) it('links to the login page when clicked on copyright', () => { @@ -78,7 +78,7 @@ describe('ContentFooter', () => { describe('links to gradido.net', () => { it('has a link to the legal notice', () => { - expect(wrapper.findAll('a.nav-link').at(0).text()).toEqual('imprint') + expect(wrapper.findAll('a.nav-link').at(0).text()).toEqual('footer.imprint') }) it('links to the https://gradido.net/en/impressum when locale is en', () => { @@ -88,7 +88,7 @@ describe('ContentFooter', () => { }) it('has a link to the privacy policy', () => { - expect(wrapper.findAll('a.nav-link').at(1).text()).toEqual('privacy_policy') + expect(wrapper.findAll('a.nav-link').at(1).text()).toEqual('footer.privacy_policy') }) it('links to the https://gradido.net/en/datenschutz when locale is en', () => { diff --git a/frontend/src/pages/Login.spec.js b/frontend/src/pages/Login.spec.js index b0217104f..732bc1301 100644 --- a/frontend/src/pages/Login.spec.js +++ b/frontend/src/pages/Login.spec.js @@ -98,7 +98,7 @@ describe('Login', () => { describe('Login header', () => { it('has a welcome message', () => { - expect(wrapper.find('div.header').text()).toBe('Gradido site.login.community') + expect(wrapper.find('div.header').text()).toBe('site.login.heading site.login.community') }) }) diff --git a/frontend/src/pages/Register.spec.js b/frontend/src/pages/Register.spec.js index 29f88b38f..c29909123 100644 --- a/frontend/src/pages/Register.spec.js +++ b/frontend/src/pages/Register.spec.js @@ -270,7 +270,7 @@ describe('Register', () => { it('shows error message', () => { expect(wrapper.find('span.alert-text').exists()).toBeTruthy() expect(wrapper.find('span.alert-text').text().length !== 0).toBeTruthy() - expect(wrapper.find('span.alert-text').text()).toContain('error.error!') + expect(wrapper.find('span.alert-text').text()).toContain('error.error') expect(wrapper.find('span.alert-text').text()).toContain('Ouch!') })