mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Changes to the Login so that the new logic is tested.
This commit is contained in:
parent
dde7bb292f
commit
3a5d34a31d
@ -86,6 +86,19 @@ describe('Login', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('communities gives back error', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
apolloQueryMock.mockRejectedValue({
|
||||||
|
message: 'Failed to get communities',
|
||||||
|
})
|
||||||
|
wrapper = new Wrapper()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('toasts an error message', () => {
|
||||||
|
expect(toastErrorMock).toBeCalledWith('Failed to get communities')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('Login header', () => {
|
describe('Login header', () => {
|
||||||
it('has a welcome message', () => {
|
it('has a welcome message', () => {
|
||||||
expect(wrapper.find('div.header').text()).toBe('Gradido site.login.community')
|
expect(wrapper.find('div.header').text()).toBe('Gradido site.login.community')
|
||||||
|
|||||||
@ -121,7 +121,7 @@ export default {
|
|||||||
this.$store.commit('community', result.data.getCommunityInfo)
|
this.$store.commit('community', result.data.getCommunityInfo)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.$toasted.error(error)
|
this.$toasted.error(error.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user