diff --git a/contentcuration/contentcuration/frontend/administration/components/ConfirmationDialog.vue b/contentcuration/contentcuration/frontend/administration/components/ConfirmationDialog.vue deleted file mode 100644 index 023f248673..0000000000 --- a/contentcuration/contentcuration/frontend/administration/components/ConfirmationDialog.vue +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - diff --git a/contentcuration/contentcuration/frontend/administration/components/__tests__/confirmationDialog.spec.js b/contentcuration/contentcuration/frontend/administration/components/__tests__/confirmationDialog.spec.js deleted file mode 100644 index 1fa1616c03..0000000000 --- a/contentcuration/contentcuration/frontend/administration/components/__tests__/confirmationDialog.spec.js +++ /dev/null @@ -1,27 +0,0 @@ -import { mount } from '@vue/test-utils'; -import ConfirmationDialog from '../ConfirmationDialog.vue'; - -function makeWrapper() { - return mount(ConfirmationDialog, { - propsData: { - title: 'title', - text: 'text', - confirmButtonText: 'confirm', - }, - }); -} - -describe('confirmationDialog', () => { - let wrapper; - beforeEach(() => { - wrapper = makeWrapper(); - }); - it('should emit input with false value on close', () => { - wrapper.find('[data-test="close"]').trigger('click'); - expect(wrapper.emitted('input')[0][0]).toBe(false); - }); - it('should emit confirm event when confirm button is clicked', () => { - wrapper.find('[data-test="confirm"]').trigger('click'); - expect(wrapper.emitted('confirm')).toHaveLength(1); - }); -}); diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SavedSearchesModal.vue b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SavedSearchesModal.vue index 8d494e8899..50d1377594 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SavedSearchesModal.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SavedSearchesModal.vue @@ -13,72 +13,65 @@ />

{{ $tr('noSavedSearches') }}

- - - + - - - +

{{ $tr('deleteConfirmation') }}

+ @@ -87,16 +80,10 @@ - - - diff --git a/contentcuration/contentcuration/frontend/shared/views/__tests__/messageDialog.spec.js b/contentcuration/contentcuration/frontend/shared/views/__tests__/messageDialog.spec.js deleted file mode 100644 index e86a1b2c1b..0000000000 --- a/contentcuration/contentcuration/frontend/shared/views/__tests__/messageDialog.spec.js +++ /dev/null @@ -1,34 +0,0 @@ -import { mount } from '@vue/test-utils'; -import MessageDialog from '../MessageDialog'; - -function makeWrapper(options) { - return mount(MessageDialog, { - propsData: { - header: 'header', - text: 'text', - }, - ...options, - }); -} - -describe('messageDialog', () => { - it('header and text should render properly from props', () => { - const wrapper = makeWrapper(); - expect(wrapper.find('[data-test="text"]').text()).toEqual('text'); - }); - it('slots should render content correctly', () => { - const wrapper = makeWrapper({ - slots: { - default: ['new text'], - buttons: ['buttons'], - }, - }); - expect(wrapper.find('[data-test="text"]').text()).toContain('new text'); - expect(wrapper.find('[data-test="buttons"]').text()).toContain('buttons'); - }); - it('close should emit an input event to close the modal', () => { - const wrapper = makeWrapper(); - wrapper.vm.close(); - expect(wrapper.emitted('input')[0][0]).toBe(false); - }); -});