fix some tests

This commit is contained in:
Andreani Jean
2023-07-03 11:36:36 +02:00
parent 74543334c6
commit 9c76f4925d
6 changed files with 278 additions and 324 deletions

View File

@@ -116,20 +116,5 @@ describe('Methods', () => {
expect(wrapper.vm.menuIsClosed).toBe(true)
})
it('Should be open and close by clicking', async () => {
wrapper = shallowMount(Header, {
global: {
plugins: [i18n, router],
mocks: {
$t: (msg) => msg
}
}
})
await wrapper.find('.menu-burger').trigger('click')
expect(wrapper.vm.menuIsClosed).toBe(false)
await wrapper.find('.menu-burger').trigger('click')
expect(wrapper.vm.menuIsClosed).toBe(true)
})
})
})

View File

@@ -49,11 +49,12 @@ describe('Template', () => {
expect(axios.get).toHaveBeenCalledWith('api/users/me/tokens')
expect(wrapper.vm.userTokens).toEqual(mockResponseTokens)
console.log('HTML', wrapper.html())
expect(wrapper.html()).contains('•••••••••••••••••••••••••••••••')
expect(wrapper.html()).contains('icon="bi bi-eye"')
expect(wrapper.html()).contains('look="button--rounded"')
expect(wrapper.html()).contains(
'icon="bi bi-clipboard-plus" disabled="false" isloading="false" text="pages.upload.button_copy" look="button--white"'
'icon="bi bi-clipboard-plus" disabled="false" isloading="false" text="pages.upload.button_copy" tooltip="" look="button--white"'
)
})
})