Commit a70a5bb1 authored by Angelina Filippova's avatar Angelina Filippova

Fix tests

parent d211d4f9
......@@ -156,11 +156,13 @@ describe('Users actions', () => {
stubs: ['router-link']
})
await flushPromises()
expect(store.state.users.fetchedUsers.length).toEqual(3)
expect(store.state.users.fetchedUsers[1].deactivated).toBe(false)
wrapper.find(htmlElement(2, 2)).trigger('click')
store.dispatch('DeleteUsers', { users: [{ active: true, deactivated: false, id: '10', nickname: 'bob', local: false, external: true, roles: { admin: false, moderator: false }, tags: ['sandbox'] }] })
await flushPromises()
expect(store.state.users.fetchedUsers.length).toEqual(2)
expect(store.state.users.fetchedUsers[1].deactivated).toBe(true)
done()
})
......
......@@ -225,11 +225,11 @@ describe('Apply users actions to multiple users', () => {
expect(wrapper.vm.deleteMultipleUsers).toHaveBeenCalled()
const remove = wrapper.vm.mappers().remove
expect(store.state.users.fetchedUsers.length).toEqual(3)
expect(store.state.users.fetchedUsers.filter(user => user.deactivated).length).toEqual(1)
remove()
await flushPromises()
expect(store.state.users.fetchedUsers.length).toEqual(0)
expect(store.state.users.fetchedUsers.length).toEqual(3)
done()
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment