From 70d8b586b629bc5d27363557469b37c4a8e8b6d3 Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 4 Feb 2022 10:29:17 +0100 Subject: [PATCH 1/9] add rmove button for all selected user in mass creation, remove overlay request by remove from only selected user for mass creation --- admin/src/components/UserTable.vue | 12 +----------- admin/src/pages/Creation.vue | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/admin/src/components/UserTable.vue b/admin/src/components/UserTable.vue index 0fa72f573..e518ac6d1 100644 --- a/admin/src/components/UserTable.vue +++ b/admin/src/components/UserTable.vue @@ -133,7 +133,7 @@ variant="danger" v-show="type === 'UserListMassCreation' || type === 'PageCreationConfirm'" size="md" - @click="overlayShow('remove', row.item)" + @click="bookmarkRemove(row.item)" class="mr-2" > @@ -242,13 +242,6 @@ export default { this.overlayBookmarkType = bookmarkType this.overlayItem = item - if (bookmarkType === 'remove') { - this.overlayText.header = this.$t('overlay.remove.title') - this.overlayText.text1 = this.$t('overlay.remove.text') - this.overlayText.text2 = this.$t('overlay.remove.question') - this.overlayText.button_ok = this.$t('overlay.remove.yes') - this.overlayText.button_cancel = this.$t('overlay.remove.no') - } if (bookmarkType === 'confirm') { this.overlayText.header = this.$t('overlay.confirm.title') this.overlayText.text1 = this.$t('overlay.confirm.text') @@ -258,9 +251,6 @@ export default { } }, overlayOK(bookmarkType, item) { - if (bookmarkType === 'remove') { - this.bookmarkRemove(item) - } if (bookmarkType === 'confirm') { this.$emit('confirm-creation', item) } diff --git a/admin/src/pages/Creation.vue b/admin/src/pages/Creation.vue index 6da762a15..9f1c4ef5d 100644 --- a/admin/src/pages/Creation.vue +++ b/admin/src/pages/Creation.vue @@ -25,14 +25,21 @@ > - +
+
+ + + alle Nutzer entfernen + +
+ +
{{ $t('multiple_creation_text') }}
From ffc96c91308fc523fc3b168c2d8ce652605f2ba2 Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 4 Feb 2022 11:25:21 +0100 Subject: [PATCH 2/9] remove overlay from tests creation.spec.js --- admin/src/pages/Creation.spec.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/admin/src/pages/Creation.spec.js b/admin/src/pages/Creation.spec.js index e06e43607..6dbc10901 100644 --- a/admin/src/pages/Creation.spec.js +++ b/admin/src/pages/Creation.spec.js @@ -174,25 +174,14 @@ describe('Creation', () => { .trigger('click') }) - it('opens a dialog', () => { - expect(wrapper.findAll('#overlay').at(1).isVisible()).toBeTruthy() - }) - describe('cancel remove item', () => { - beforeEach(async () => { - await wrapper.findAll('#overlay').at(1).findAll('button').at(0).trigger('click') - }) - - it('closes the dialog', () => { - expect(wrapper.findAll('#overlay').at(1).isVisible()).toBeFalsy() - }) it('has one item in left table', () => { - expect(wrapper.findAll('table').at(0).findAll('tbody > tr')).toHaveLength(1) + expect(wrapper.findAll('table').at(0).findAll('tbody > tr')).toHaveLength(2) }) it('has one item in right table', () => { - expect(wrapper.findAll('table').at(1).findAll('tbody > tr')).toHaveLength(1) + expect(wrapper.findAll('table').at(1).findAll('tbody > tr')).toHaveLength(0) }) }) From df8ce64680713de007e6fbd9770e78a19745b377 Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 4 Feb 2022 11:30:28 +0100 Subject: [PATCH 3/9] add lokalize button text --- admin/src/locales/de.json | 1 + admin/src/locales/en.json | 1 + admin/src/pages/Creation.vue | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index 7585ee122..05e82bdd9 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -54,6 +54,7 @@ } }, "remove": "Entfernen", + "remove_all":"alle Nutzer entfernen", "transaction": "Transaktion", "transactionlist": { "amount": "Betrag", diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 2680a1c00..4c25ca149 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -54,6 +54,7 @@ } }, "remove": "Remove", + "remove_all":"Remove all users", "transaction": "Transaction", "transactionlist": { "amount": "Amount", diff --git a/admin/src/pages/Creation.vue b/admin/src/pages/Creation.vue index 9f1c4ef5d..28ef8d344 100644 --- a/admin/src/pages/Creation.vue +++ b/admin/src/pages/Creation.vue @@ -29,7 +29,8 @@
- alle Nutzer entfernen + + {{ $t('remove_all') }}
Date: Fri, 4 Feb 2022 11:31:17 +0100 Subject: [PATCH 4/9] yarn lint, yarn locales --- admin/src/locales/de.json | 2 +- admin/src/locales/en.json | 2 +- admin/src/pages/Creation.spec.js | 1 - admin/src/pages/Creation.vue | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index 05e82bdd9..327cfd302 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -54,7 +54,7 @@ } }, "remove": "Entfernen", - "remove_all":"alle Nutzer entfernen", + "remove_all": "alle Nutzer entfernen", "transaction": "Transaktion", "transactionlist": { "amount": "Betrag", diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 4c25ca149..3f12f10a8 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -54,7 +54,7 @@ } }, "remove": "Remove", - "remove_all":"Remove all users", + "remove_all": "Remove all users", "transaction": "Transaction", "transactionlist": { "amount": "Amount", diff --git a/admin/src/pages/Creation.spec.js b/admin/src/pages/Creation.spec.js index 6dbc10901..eced66544 100644 --- a/admin/src/pages/Creation.spec.js +++ b/admin/src/pages/Creation.spec.js @@ -175,7 +175,6 @@ describe('Creation', () => { }) describe('cancel remove item', () => { - it('has one item in left table', () => { expect(wrapper.findAll('table').at(0).findAll('tbody > tr')).toHaveLength(2) }) diff --git a/admin/src/pages/Creation.vue b/admin/src/pages/Creation.vue index 28ef8d344..13e3783da 100644 --- a/admin/src/pages/Creation.vue +++ b/admin/src/pages/Creation.vue @@ -29,8 +29,8 @@
- - {{ $t('remove_all') }} + + {{ $t('remove_all') }}
Date: Fri, 4 Feb 2022 14:41:24 +0100 Subject: [PATCH 5/9] improve test --- admin/src/pages/Creation.spec.js | 79 +++++++++----------------------- admin/src/pages/Creation.vue | 6 +-- 2 files changed, 25 insertions(+), 60 deletions(-) diff --git a/admin/src/pages/Creation.spec.js b/admin/src/pages/Creation.spec.js index eced66544..85ad81031 100644 --- a/admin/src/pages/Creation.spec.js +++ b/admin/src/pages/Creation.spec.js @@ -154,43 +154,16 @@ describe('Creation', () => { }, ]) }) - }) - describe('remove item', () => { - beforeEach(async () => { - await wrapper - .findAll('table') - .at(0) - .findAll('tbody > tr') - .at(1) - .find('button') - .trigger('click') - await wrapper - .findAll('table') - .at(1) - .findAll('tbody > tr') - .at(0) - .find('button') - .trigger('click') - }) - - describe('cancel remove item', () => { - it('has one item in left table', () => { - expect(wrapper.findAll('table').at(0).findAll('tbody > tr')).toHaveLength(2) - }) - - it('has one item in right table', () => { - expect(wrapper.findAll('table').at(1).findAll('tbody > tr')).toHaveLength(0) - }) - }) - - describe('confirm remove item', () => { + describe('remove item', () => { beforeEach(async () => { - await wrapper.findAll('#overlay').at(1).findAll('button').at(1).trigger('click') - }) - - it('closes the dialog', () => { - expect(wrapper.findAll('#overlay').at(1).isVisible()).toBeFalsy() + await wrapper + .findAll('table') + .at(1) + .findAll('tbody > tr') + .at(0) + .find('button') + .trigger('click') }) it('has two items in left table', () => { @@ -211,32 +184,24 @@ describe('Creation', () => { expect(storeCommitMock).toBeCalledWith('setUserSelectedInMassCreation', []) }) }) - }) - // this can only happen after API call in CreationForm - describe('remove all bookmarks', () => { - beforeEach(async () => { - await wrapper - .findAll('table') - .at(0) - .findAll('tbody > tr') - .at(1) - .find('button') - .trigger('click') - jest.clearAllMocks() - wrapper.findComponent({ name: 'CreationFormular' }).vm.$emit('remove-all-bookmark') - }) + describe('remove all bookmarks', () => { + beforeEach(async () => { + jest.clearAllMocks() + await wrapper.find('button.btn-light').trigger('click') + }) - it('has no items in right table', () => { - expect(wrapper.findAll('table').at(1).findAll('tbody > tr')).toHaveLength(0) - }) + it('has no items in right table', () => { + expect(wrapper.findAll('table').at(1).findAll('tbody > tr')).toHaveLength(0) + }) - it('commits empty array to userSelectedInMassCreation', () => { - expect(storeCommitMock).toBeCalledWith('setUserSelectedInMassCreation', []) - }) + it('commits empty array to userSelectedInMassCreation', () => { + expect(storeCommitMock).toBeCalledWith('setUserSelectedInMassCreation', []) + }) - it('calls searchUsers', () => { - expect(apolloQueryMock).toBeCalled() + it('calls searchUsers', () => { + expect(apolloQueryMock).toBeCalled() + }) }) }) diff --git a/admin/src/pages/Creation.vue b/admin/src/pages/Creation.vue index 13e3783da..7810a611f 100644 --- a/admin/src/pages/Creation.vue +++ b/admin/src/pages/Creation.vue @@ -27,7 +27,7 @@
- + {{ $t('remove_all') }} @@ -49,7 +49,7 @@ type="massCreation" :creation="creation" :items="itemsMassCreation" - @remove-all-bookmark="removeAllBookmark" + @remove-all-bookmark="removeAllBookmarks" /> @@ -131,7 +131,7 @@ export default { ) this.$store.commit('setUserSelectedInMassCreation', this.itemsMassCreation) }, - removeAllBookmark() { + removeAllBookmarks() { this.itemsMassCreation = [] this.$store.commit('setUserSelectedInMassCreation', []) this.getUsers() From 3c727795742ac2e66823c3dbf1ae99259603de66 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Fri, 4 Feb 2022 16:41:53 +0100 Subject: [PATCH 6/9] Test for user table in component folder --- admin/src/components/UserTable.spec.js | 153 ++++++++++++++++++++++--- admin/src/pages/UserSearch.spec.js | 94 --------------- 2 files changed, 138 insertions(+), 109 deletions(-) diff --git a/admin/src/components/UserTable.spec.js b/admin/src/components/UserTable.spec.js index 982b65a81..b83711c18 100644 --- a/admin/src/components/UserTable.spec.js +++ b/admin/src/components/UserTable.spec.js @@ -1,7 +1,9 @@ -import { mount } from '@vue/test-utils' +import { createLocalVue, mount } from '@vue/test-utils' +import { BootstrapVue, IconsPlugin } from 'bootstrap-vue' import UserTable from './UserTable.vue' -const localVue = global.localVue +let localVue +// const localVue = global.localVue const apolloQueryMock = jest.fn() apolloQueryMock.mockResolvedValue() @@ -11,22 +13,36 @@ describe('UserTable', () => { const defaultItemsUser = [ { - email: 'bibi@bloxberg.de', + userId: 1, firstName: 'Bibi', lastName: 'Bloxberg', - creation: [1000, 1000, 1000], + email: 'bibi@bloxberg.de', + creation: [200, 400, 600], + emailChecked: true, }, { - email: 'bibi@bloxberg.de', - firstName: 'Bibi', - lastName: 'Bloxberg', + userId: 2, + firstName: 'Benjamin', + lastName: 'Blümchen', + email: 'benjamin@bluemchen.de', creation: [1000, 1000, 1000], + emailChecked: true, }, { - email: 'bibi@bloxberg.de', - firstName: 'Bibi', - lastName: 'Bloxberg', + userId: 3, + firstName: 'Peter', + lastName: 'Lustig', + email: 'peter@lustig.de', + creation: [0, 0, 0], + emailChecked: true, + }, + { + userId: 4, + firstName: 'New', + lastName: 'User', + email: 'new@user.ch', creation: [1000, 1000, 1000], + emailChecked: false, }, ] @@ -107,7 +123,7 @@ describe('UserTable', () => { const mocks = { $t: jest.fn((t) => t), - $d: jest.fn((d) => d), + $d: jest.fn((d) => String(d)), $apollo: { query: apolloQueryMock, }, @@ -117,12 +133,15 @@ describe('UserTable', () => { } const Wrapper = (propsData) => { + localVue = createLocalVue() + localVue.use(BootstrapVue) + localVue.use(IconsPlugin) return mount(UserTable, { localVue, propsData, mocks }) } describe('mount', () => { describe('type PageUserSearch', () => { - beforeEach(() => { + beforeEach(async () => { wrapper = Wrapper(propsDataPageUserSearch) }) @@ -175,12 +194,12 @@ describe('UserTable', () => { }) describe('content', () => { - it('has 3 rows', () => { - expect(wrapper.findAll('tbody tr').length).toBe(3) + it('has 4 rows', () => { + expect(wrapper.findAll('tbody tr')).toHaveLength(4) }) it('has 7 columns', () => { - expect(wrapper.findAll('tr:nth-child(1) > td').length).toBe(7) + expect(wrapper.findAll('tr:nth-child(1) > td')).toHaveLength(7) }) it('find button on fifth column', () => { @@ -189,6 +208,110 @@ describe('UserTable', () => { ).toBeTruthy() }) }) + + describe('row toggling', () => { + describe('user with email not activated', () => { + it('has no details button', () => { + expect( + wrapper.findAll('tbody > tr').at(3).findAll('td').at(4).find('button').exists(), + ).toBeFalsy() + }) + + it('has a red confirmed button with envelope item', () => { + const row = wrapper.findAll('tbody > tr').at(3) + expect(row.findAll('td').at(5).find('button').exists()).toBeTruthy() + expect(row.findAll('td').at(5).find('button').classes('btn-danger')).toBeTruthy() + expect(row.findAll('td').at(5).find('svg').classes('bi-envelope')).toBeTruthy() + }) + + describe('click on envelope', () => { + beforeEach(async () => { + await wrapper + .findAll('tbody > tr') + .at(3) + .findAll('td') + .at(5) + .find('button') + .trigger('click') + }) + + it('opens the details', async () => { + expect(wrapper.findAll('tbody > tr')).toHaveLength(6) + expect(wrapper.findAll('tbody > tr').at(5).find('input').element.value).toBe( + 'new@user.ch', + ) + expect(wrapper.findAll('tbody > tr').at(5).text()).toContain( + 'unregister_mail.text_false', + ) + // HACK: for some reason we need to close the row details after this test + await wrapper + .findAll('tbody > tr') + .at(3) + .findAll('td') + .at(5) + .find('button') + .trigger('click') + }) + + describe('click on envelope again', () => { + beforeEach(async () => { + await wrapper + .findAll('tbody > tr') + .at(3) + .findAll('td') + .at(5) + .find('button') + .trigger('click') + }) + + it('closes the details', () => { + expect(wrapper.findAll('tbody > tr')).toHaveLength(4) + }) + }) + + describe('click on close details', () => { + beforeEach(async () => { + await wrapper.findAll('tbody > tr').at(5).findAll('button').at(1).trigger('click') + }) + + it('closes the details', () => { + expect(wrapper.findAll('tbody > tr')).toHaveLength(4) + }) + }) + }) + }) + + describe('different details', () => { + it.skip('shows the creation formular for second user', async () => { + await wrapper + .findAll('tbody > tr') + .at(1) + .findAll('td') + .at(4) + .find('button') + .trigger('click') + expect(wrapper.findAll('tbody > tr')).toHaveLength(6) + expect( + wrapper + .findAll('tbody > tr') + .at(3) + .find('div.component-creation-formular') + .exists(), + ).toBeTruthy() + }) + + it.skip('shows the transactions for third user', async () => { + await wrapper + .findAll('tbody > tr') + .at(4) + .findAll('td') + .at(6) + .find('button') + .trigger('click') + expect(wrapper.findAll('tbody > tr')).toHaveLength(6) + }) + }) + }) }) }) diff --git a/admin/src/pages/UserSearch.spec.js b/admin/src/pages/UserSearch.spec.js index 64783e82e..df326923f 100644 --- a/admin/src/pages/UserSearch.spec.js +++ b/admin/src/pages/UserSearch.spec.js @@ -88,100 +88,6 @@ describe('UserSearch', () => { ) }) - describe('row toggling', () => { - it('has 4 users in the table', () => { - expect(wrapper.findAll('tbody > tr')).toHaveLength(4) - }) - - describe('user with email not activated', () => { - it('has no details button', () => { - expect( - wrapper.findAll('tbody > tr').at(3).findAll('td').at(4).find('button').exists(), - ).toBeFalsy() - }) - - it('has a red confirmed button with envelope item', () => { - const row = wrapper.findAll('tbody > tr').at(3) - expect(row.findAll('td').at(5).find('button').exists()).toBeTruthy() - expect(row.findAll('td').at(5).find('button').classes('btn-danger')).toBeTruthy() - expect(row.findAll('td').at(5).find('svg').classes('bi-envelope')).toBeTruthy() - }) - - describe('click on envelope', () => { - it('opens the details', async () => { - await wrapper - .findAll('tbody > tr') - .at(3) - .findAll('td') - .at(5) - .find('button') - .trigger('click') - expect(wrapper.findAll('tbody > tr')).toHaveLength(6) - expect(wrapper.findAll('tbody > tr').at(5).find('input').element.value).toBe( - 'new@user.ch', - ) - expect(wrapper.findAll('tbody > tr').at(5).text()).toContain( - 'unregister_mail.text_false', - ) - }) - - describe('click on envelope again', () => { - it('closes the details', async () => { - await wrapper - .findAll('tbody > tr') - .at(3) - .findAll('td') - .at(5) - .find('button') - .trigger('click') - expect(wrapper.findAll('tbody > tr')).toHaveLength(4) - }) - }) - - describe('click on close details', () => { - it('closes the details', async () => { - await wrapper - .findAll('tbody > tr') - .at(3) - .findAll('td') - .at(5) - .find('button') - .trigger('click') - await wrapper.findAll('tbody > tr').at(5).findAll('button').at(1).trigger('click') - expect(wrapper.findAll('tbody > tr')).toHaveLength(4) - }) - }) - }) - }) - - describe('different details', () => { - it.skip('shows the creation formular for second user', async () => { - await wrapper - .findAll('tbody > tr') - .at(1) - .findAll('td') - .at(4) - .find('button') - .trigger('click') - expect(wrapper.findAll('tbody > tr')).toHaveLength(6) - expect( - wrapper.findAll('tbody > tr').at(3).find('div.component-creation-formular').exists(), - ).toBeTruthy() - }) - - it.skip('shows the transactions for third user', async () => { - await wrapper - .findAll('tbody > tr') - .at(4) - .findAll('td') - .at(6) - .find('button') - .trigger('click') - expect(wrapper.findAll('tbody > tr')).toHaveLength(6) - }) - }) - }) - describe('unconfirmed emails', () => { beforeEach(async () => { await wrapper.find('button.btn-block').trigger('click') From 301ceb38a8d0e2eabc960db8350601bc1834209c Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Fri, 4 Feb 2022 16:59:54 +0100 Subject: [PATCH 7/9] test creation confitmation by clicks instead of emits --- admin/src/pages/CreationConfirm.spec.js | 57 +++++++++++++++++++------ 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/admin/src/pages/CreationConfirm.spec.js b/admin/src/pages/CreationConfirm.spec.js index 5768e1078..2520fd37b 100644 --- a/admin/src/pages/CreationConfirm.spec.js +++ b/admin/src/pages/CreationConfirm.spec.js @@ -78,6 +78,7 @@ describe('CreationConfirm', () => { it('commits resetOpenCreations to store', () => { expect(storeCommitMock).toBeCalledWith('resetOpenCreations') }) + it('commits setOpenCreations to store', () => { expect(storeCommitMock).toBeCalledWith('setOpenCreations', 2) }) @@ -85,7 +86,7 @@ describe('CreationConfirm', () => { describe('remove creation with success', () => { beforeEach(async () => { - await wrapper.findComponent({ name: 'UserTable' }).vm.$emit('remove-creation', { id: 1 }) + await wrapper.findAll('tr').at(1).findAll('button').at(0).trigger('click') }) it('calls the deletePendingCreation mutation', () => { @@ -107,7 +108,7 @@ describe('CreationConfirm', () => { describe('remove creation with error', () => { beforeEach(async () => { apolloMutateMock.mockRejectedValue({ message: 'Ouchhh!' }) - await wrapper.findComponent({ name: 'UserTable' }).vm.$emit('remove-creation', { id: 1 }) + await wrapper.findAll('tr').at(1).findAll('button').at(0).trigger('click') }) it('toasts an error message', () => { @@ -118,22 +119,52 @@ describe('CreationConfirm', () => { describe('confirm creation with success', () => { beforeEach(async () => { apolloMutateMock.mockResolvedValue({}) - await wrapper.findComponent({ name: 'UserTable' }).vm.$emit('confirm-creation', { id: 2 }) + await wrapper.findAll('tr').at(2).findAll('button').at(2).trigger('click') }) - it('calls the confirmPendingCreation mutation', () => { - expect(apolloMutateMock).toBeCalledWith({ - mutation: confirmPendingCreation, - variables: { id: 2 }, + describe('overlay', () => { + it('opens the overlay', () => { + expect(wrapper.find('#overlay').isVisible()).toBeTruthy() }) - }) - it('commits openCreationsMinus to store', () => { - expect(storeCommitMock).toBeCalledWith('openCreationsMinus', 1) - }) + describe('cancel confirmation', () => { + beforeEach(async () => { + await wrapper.find('#overlay').findAll('button').at(0).trigger('click') + }) - it('toasts a success message', () => { - expect(toastedSuccessMock).toBeCalledWith('creation_form.toasted_created') + it('closes the overlay', () => { + expect(wrapper.find('#overlay').isVisible()).toBeFalsy() + }) + + it('still has 2 items in the table', () => { + expect(wrapper.findAll('tbody > tr')).toHaveLength(2) + }) + }) + + describe('confirm creation', () => { + beforeEach(async () => { + await wrapper.find('#overlay').findAll('button').at(1).trigger('click') + }) + + it('calls the confirmPendingCreation mutation', () => { + expect(apolloMutateMock).toBeCalledWith({ + mutation: confirmPendingCreation, + variables: { id: 2 }, + }) + }) + + it('commits openCreationsMinus to store', () => { + expect(storeCommitMock).toBeCalledWith('openCreationsMinus', 1) + }) + + it('toasts a success message', () => { + expect(toastedSuccessMock).toBeCalledWith('creation_form.toasted_created') + }) + + it('has 1 item left in the table', () => { + expect(wrapper.findAll('tbody > tr')).toHaveLength(1) + }) + }) }) }) From a39efaafcd996b1bc74c18cc8c2beeabbfa55ff9 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Fri, 4 Feb 2022 17:00:42 +0100 Subject: [PATCH 8/9] coverage admin interface to 93% --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7aff56f3..383735507 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -448,7 +448,7 @@ jobs: report_name: Coverage Admin Interface type: lcov result_path: ./coverage/lcov.info - min_coverage: 91 + min_coverage: 93 token: ${{ github.token }} ############################################################################## From 544b4da370ac2d3e8bd1d5571b93d139f64cfda8 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Fri, 4 Feb 2022 17:02:40 +0100 Subject: [PATCH 9/9] remove artifacts --- admin/src/components/UserTable.spec.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/admin/src/components/UserTable.spec.js b/admin/src/components/UserTable.spec.js index b83711c18..d900b126d 100644 --- a/admin/src/components/UserTable.spec.js +++ b/admin/src/components/UserTable.spec.js @@ -1,9 +1,7 @@ -import { createLocalVue, mount } from '@vue/test-utils' -import { BootstrapVue, IconsPlugin } from 'bootstrap-vue' +import { mount } from '@vue/test-utils' import UserTable from './UserTable.vue' -let localVue -// const localVue = global.localVue +const localVue = global.localVue const apolloQueryMock = jest.fn() apolloQueryMock.mockResolvedValue() @@ -133,9 +131,6 @@ describe('UserTable', () => { } const Wrapper = (propsData) => { - localVue = createLocalVue() - localVue.use(BootstrapVue) - localVue.use(IconsPlugin) return mount(UserTable, { localVue, propsData, mocks }) }