diff --git a/src/api/__mocks__/users.js b/src/api/__mocks__/users.js index 862bdf17..18acb12c 100644 --- a/src/api/__mocks__/users.js +++ b/src/api/__mocks__/users.js @@ -106,6 +106,10 @@ export async function deleteUsers(nicknames, authHost, token) { }) } +export async function listAllTags(authHost, token) { + return Promise.resolve({ data: ['verify', 'mrf_tag:media-force-nsfw'] }) +} + export async function tagUser(nickname, tag, authHost, token) { return Promise.resolve() } diff --git a/test/views/users/index.test.js b/test/views/users/index.test.js index 10c3e90d..fddced58 100644 --- a/test/views/users/index.test.js +++ b/test/views/users/index.test.js @@ -138,7 +138,7 @@ describe('Users actions', () => { const dropdownMenuItems = wrapper.findAll( `.el-table__fixed-body-wrapper table tr:nth-child(2) ul.el-dropdown-menu > li` ) - expect(dropdownMenuItems.length).toBe(7) + expect(dropdownMenuItems.length).toBe(3) done() }) @@ -271,7 +271,7 @@ describe('Users actions', () => { expect(wrapper.vm.resetPasswordDialogOpen).toBe(false) expect(store.state.users.passwordResetToken.token).toBe('') - wrapper.find(htmlElement(1, 12)).trigger('click') + wrapper.find(htmlElement(1, 6)).trigger('click') await flushPromises() expect(wrapper.vm.resetPasswordDialogOpen).toBe(true)