mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix test for wallet link in navbar to raise coverage
This commit is contained in:
parent
9d60e414ad
commit
313e9c6e9f
@ -68,14 +68,11 @@ describe('NavBar', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('wallet', () => {
|
describe('wallet', () => {
|
||||||
const windowLocationMock = jest.fn()
|
|
||||||
const windowLocation = window.location
|
const windowLocation = window.location
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
delete window.location
|
delete window.location
|
||||||
window.location = {
|
window.location = ''
|
||||||
assign: windowLocationMock,
|
await wrapper.findAll('.nav-item').at(4).find('a').trigger('click')
|
||||||
}
|
|
||||||
await wrapper.findAll('.nav-item').at(5).find('a').trigger('click')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@ -83,8 +80,8 @@ describe('NavBar', () => {
|
|||||||
window.location = windowLocation
|
window.location = windowLocation
|
||||||
})
|
})
|
||||||
|
|
||||||
it.skip('changes window location to wallet', () => {
|
it('changes window location to wallet', () => {
|
||||||
expect(windowLocationMock()).toBe('valid-token')
|
expect(window.location).toBe('http://localhost/authenticate?token=valid-token')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('dispatches logout to store', () => {
|
it('dispatches logout to store', () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user