From 08cc3e15f5070591d893961bab073e463206231b Mon Sep 17 00:00:00 2001
From: z-ABYa <189abhish@gmail.com>
Date: Wed, 15 Oct 2025 15:38:33 +0530
Subject: [PATCH 1/2] Removed MessageDialogue in favour of KModal and updated
required test suite
---
.../channelEdit/views/trash/TrashModal.vue | 30 ++++++-------------
.../views/trash/__tests__/trashModal.spec.js | 6 ++--
2 files changed, 13 insertions(+), 23 deletions(-)
diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
index 00822ee76b..8551f2ea6b 100644
--- a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
+++ b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
@@ -145,28 +145,16 @@
{{ $tr('deleteButton') }}
-
-
-
- {{ $tr('deleteConfirmationCancelButton') }}
-
-
- {{ $tr('deleteConfirmationDeleteButton') }}
-
-
-
+
{{ $tr('deleteConfirmationText') }}
+
{
it('clicking CLOSE on delete confirmation dialog should close the dialog', async () => {
await wrapper.setData({ showConfirmationDialog: true });
- await wrapper.findComponent('[data-test="closeconfirm"]').trigger('click');
+ const modal = wrapper.findComponent({ name: 'KModal' });
+ await modal.vm.$emit('cancel');
expect(wrapper.vm.showConfirmationDialog).toBe(false);
});
@@ -143,7 +144,8 @@ describe('trashModal', () => {
const deleteContentNodes = jest.spyOn(wrapper.vm, 'deleteContentNodes');
deleteContentNodes.mockImplementation(() => Promise.resolve());
await wrapper.setData({ selected, showConfirmationDialog: true });
- await wrapper.findComponent('[data-test="deleteconfirm"]').trigger('click');
+ const modal = wrapper.findComponent({ name: 'KModal' });
+ await modal.vm.$emit('submit');
expect(deleteContentNodes).toHaveBeenCalledWith(selected);
});
});
From 8f27ec2088008f6ff5822b6d3d54a99d9b368c31 Mon Sep 17 00:00:00 2001
From: z-ABYa <189abhish@gmail.com>
Date: Thu, 23 Oct 2025 16:39:53 +0530
Subject: [PATCH 2/2] fixes linting error
---
.../frontend/channelEdit/views/trash/TrashModal.vue | 2 --
1 file changed, 2 deletions(-)
diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
index 8551f2ea6b..fa4fc13ed4 100644
--- a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
+++ b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
@@ -178,7 +178,6 @@
import { RouteNames } from '../../constants';
import ContentNodeIcon from 'shared/views/ContentNodeIcon';
import Checkbox from 'shared/views/form/Checkbox';
- import MessageDialog from 'shared/views/MessageDialog';
import LoadingText from 'shared/views/LoadingText';
import FullscreenModal from 'shared/views/FullscreenModal';
import { titleMixin, routerMixin } from 'shared/mixins';
@@ -192,7 +191,6 @@
ContentNodeIcon,
ResourceDrawer,
Checkbox,
- MessageDialog,
LoadingText,
FullscreenModal,
MoveModal,