mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix: Flaky Dashboard Layout Test on Logout
This commit is contained in:
parent
2342b2e266
commit
1df9618473
@ -137,6 +137,7 @@ describe('DashboardLayoutGdd', () => {
|
|||||||
})
|
})
|
||||||
await wrapper.findComponent({ name: 'sidebar' }).vm.$emit('logout')
|
await wrapper.findComponent({ name: 'sidebar' }).vm.$emit('logout')
|
||||||
await flushPromises()
|
await flushPromises()
|
||||||
|
await wrapper.vm.$nextTick()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('calls the API', async () => {
|
it('calls the API', async () => {
|
||||||
@ -168,6 +169,17 @@ describe('DashboardLayoutGdd', () => {
|
|||||||
it('redirects to login page', () => {
|
it('redirects to login page', () => {
|
||||||
expect(routerPushMock).toBeCalledWith('/login')
|
expect(routerPushMock).toBeCalledWith('/login')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('redirect to login already done', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
mocks.$router.currentRoute.path = '/login'
|
||||||
|
jest.resetAllMocks()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not call the redirect to login', () => {
|
||||||
|
expect(routerPushMock).not.toBeCalled()
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('update balance', () => {
|
describe('update balance', () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user