mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix most tests
This commit is contained in:
parent
31f176a122
commit
eb9e409891
@ -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 () => {
|
||||
|
||||
@ -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', () => {
|
||||
|
||||
@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -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', () => {
|
||||
|
||||
@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -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!')
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user