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', () => {
|
||||
const windowLocationMock = jest.fn()
|
||||
const windowLocation = window.location
|
||||
beforeEach(async () => {
|
||||
delete window.location
|
||||
window.location = {
|
||||
assign: windowLocationMock,
|
||||
}
|
||||
await wrapper.findAll('.nav-item').at(5).find('a').trigger('click')
|
||||
window.location = ''
|
||||
await wrapper.findAll('.nav-item').at(4).find('a').trigger('click')
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
@ -83,8 +80,8 @@ describe('NavBar', () => {
|
||||
window.location = windowLocation
|
||||
})
|
||||
|
||||
it.skip('changes window location to wallet', () => {
|
||||
expect(windowLocationMock()).toBe('valid-token')
|
||||
it('changes window location to wallet', () => {
|
||||
expect(window.location).toBe('http://localhost/authenticate?token=valid-token')
|
||||
})
|
||||
|
||||
it('dispatches logout to store', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user