forked from AkkomaGang/admin-fe
Fix tests
This commit is contained in:
parent
fb9d166f5d
commit
4103faa079
1 changed files with 9 additions and 9 deletions
|
@ -163,7 +163,7 @@ describe('Apply users actions to multiple users', () => {
|
||||||
const activateMultipleUsersStub = jest.fn()
|
const activateMultipleUsersStub = jest.fn()
|
||||||
wrapper.setMethods({ activateMultipleUsers: activateMultipleUsersStub })
|
wrapper.setMethods({ activateMultipleUsers: activateMultipleUsersStub })
|
||||||
|
|
||||||
wrapper.find(`.el-dropdown-menu__item:nth-child(5)`).trigger('click')
|
wrapper.find(`.el-dropdown-menu__item:nth-child(7)`).trigger('click')
|
||||||
expect(wrapper.vm.activateMultipleUsers).toHaveBeenCalled()
|
expect(wrapper.vm.activateMultipleUsers).toHaveBeenCalled()
|
||||||
|
|
||||||
const activate = wrapper.vm.mappers().activate
|
const activate = wrapper.vm.mappers().activate
|
||||||
|
@ -190,7 +190,7 @@ describe('Apply users actions to multiple users', () => {
|
||||||
const deactivateMultipleUsersStub = jest.fn()
|
const deactivateMultipleUsersStub = jest.fn()
|
||||||
wrapper.setMethods({ deactivateMultipleUsers: deactivateMultipleUsersStub })
|
wrapper.setMethods({ deactivateMultipleUsers: deactivateMultipleUsersStub })
|
||||||
|
|
||||||
wrapper.find(`.el-dropdown-menu__item:nth-child(6)`).trigger('click')
|
wrapper.find(`.el-dropdown-menu__item:nth-child(8)`).trigger('click')
|
||||||
expect(wrapper.vm.deactivateMultipleUsers).toHaveBeenCalled()
|
expect(wrapper.vm.deactivateMultipleUsers).toHaveBeenCalled()
|
||||||
|
|
||||||
const deactivate = wrapper.vm.mappers().deactivate
|
const deactivate = wrapper.vm.mappers().deactivate
|
||||||
|
@ -221,7 +221,7 @@ describe('Apply users actions to multiple users', () => {
|
||||||
const deleteMultipleUsersStub = jest.fn()
|
const deleteMultipleUsersStub = jest.fn()
|
||||||
wrapper.setMethods({ deleteMultipleUsers: deleteMultipleUsersStub })
|
wrapper.setMethods({ deleteMultipleUsers: deleteMultipleUsersStub })
|
||||||
|
|
||||||
wrapper.find(`.el-dropdown-menu__item:nth-child(7)`).trigger('click')
|
wrapper.find(`.el-dropdown-menu__item:nth-child(9)`).trigger('click')
|
||||||
expect(wrapper.vm.deleteMultipleUsers).toHaveBeenCalled()
|
expect(wrapper.vm.deleteMultipleUsers).toHaveBeenCalled()
|
||||||
|
|
||||||
const remove = wrapper.vm.mappers().remove
|
const remove = wrapper.vm.mappers().remove
|
||||||
|
@ -247,15 +247,15 @@ describe('Apply users actions to multiple users', () => {
|
||||||
const addTagForMultipleUsersStub = jest.fn()
|
const addTagForMultipleUsersStub = jest.fn()
|
||||||
wrapper.setMethods({ addTagForMultipleUsers: addTagForMultipleUsersStub })
|
wrapper.setMethods({ addTagForMultipleUsers: addTagForMultipleUsersStub })
|
||||||
|
|
||||||
wrapper.find(`.el-dropdown-menu__item:nth-child(9) button:nth-child(1)`).trigger('click')
|
wrapper.find(`.el-dropdown-menu__item:nth-child(11) button:nth-child(1)`).trigger('click')
|
||||||
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalled()
|
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalled()
|
||||||
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('force_nsfw')
|
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('force_nsfw')
|
||||||
|
|
||||||
wrapper.find(`.el-dropdown-menu__item:nth-child(11) button:nth-child(1)`).trigger('click')
|
wrapper.find(`.el-dropdown-menu__item:nth-child(13) button:nth-child(1)`).trigger('click')
|
||||||
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalled()
|
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalled()
|
||||||
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('force_unlisted')
|
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('force_unlisted')
|
||||||
|
|
||||||
wrapper.find(`.el-dropdown-menu__item:nth-child(13) button:nth-child(1)`).trigger('click')
|
wrapper.find(`.el-dropdown-menu__item:nth-child(15 ) button:nth-child(1)`).trigger('click')
|
||||||
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalled()
|
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalled()
|
||||||
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('disable_remote_subscription')
|
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('disable_remote_subscription')
|
||||||
|
|
||||||
|
@ -287,15 +287,15 @@ describe('Apply users actions to multiple users', () => {
|
||||||
const removeTagFromMultipleUsersStub = jest.fn()
|
const removeTagFromMultipleUsersStub = jest.fn()
|
||||||
wrapper.setMethods({ removeTagFromMultipleUsers: removeTagFromMultipleUsersStub })
|
wrapper.setMethods({ removeTagFromMultipleUsers: removeTagFromMultipleUsersStub })
|
||||||
|
|
||||||
wrapper.find(`.el-dropdown-menu__item:nth-child(10) button:nth-child(2)`).trigger('click')
|
wrapper.find(`.el-dropdown-menu__item:nth-child(12) button:nth-child(2)`).trigger('click')
|
||||||
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalled()
|
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalled()
|
||||||
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('strip_media')
|
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('strip_media')
|
||||||
|
|
||||||
wrapper.find(`.el-dropdown-menu__item:nth-child(12) button:nth-child(2)`).trigger('click')
|
wrapper.find(`.el-dropdown-menu__item:nth-child(14) button:nth-child(2)`).trigger('click')
|
||||||
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalled()
|
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalled()
|
||||||
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('sandbox')
|
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('sandbox')
|
||||||
|
|
||||||
wrapper.find(`.el-dropdown-menu__item:nth-child(14) button:nth-child(2)`).trigger('click')
|
wrapper.find(`.el-dropdown-menu__item:nth-child(16) button:nth-child(2)`).trigger('click')
|
||||||
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalled()
|
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalled()
|
||||||
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('disable_any_subscription')
|
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('disable_any_subscription')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue