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/5] 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/5] 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,
From 37bf338cc4878383360ee72bb7fd24a7776259cf Mon Sep 17 00:00:00 2001
From: z-ABYa <189abhish@gmail.com>
Date: Wed, 29 Oct 2025 22:45:38 +0530
Subject: [PATCH 3/5] added data-test
---
.../frontend/channelEdit/views/trash/TrashModal.vue | 1 +
.../channelEdit/views/trash/__tests__/trashModal.spec.js | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
index fa4fc13ed4..6be9d9e62e 100644
--- a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
+++ b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
@@ -146,6 +146,7 @@
{
it('clicking CLOSE on delete confirmation dialog should close the dialog', async () => {
await wrapper.setData({ showConfirmationDialog: true });
- const modal = wrapper.findComponent({ name: 'KModal' });
+ const modal = wrapper.find('[data-test="delete-confirmation-dialog"]');
await modal.vm.$emit('cancel');
expect(wrapper.vm.showConfirmationDialog).toBe(false);
});
@@ -144,7 +144,7 @@ describe('trashModal', () => {
const deleteContentNodes = jest.spyOn(wrapper.vm, 'deleteContentNodes');
deleteContentNodes.mockImplementation(() => Promise.resolve());
await wrapper.setData({ selected, showConfirmationDialog: true });
- const modal = wrapper.findComponent({ name: 'KModal' });
+ const modal = wrapper.find('[data-test="delete-confirmation-dialog"]');
await modal.vm.$emit('submit');
expect(deleteContentNodes).toHaveBeenCalledWith(selected);
});
From c31ae2b13374e2a69929a885c2b1d7906bfc2505 Mon Sep 17 00:00:00 2001
From: z-ABYa <189abhish@gmail.com>
Date: Tue, 4 Nov 2025 19:21:47 +0530
Subject: [PATCH 4/5] added data-test to KModal
---
.../frontend/channelEdit/views/trash/TrashModal.vue | 2 +-
.../channelEdit/views/trash/__tests__/trashModal.spec.js | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
index d56eaf024a..4fe8782773 100644
--- a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
+++ b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
@@ -146,8 +146,8 @@
{
it('clicking CLOSE on delete confirmation dialog should close the dialog', async () => {
await wrapper.setData({ showConfirmationDialog: true });
- const modal = wrapper.find('[data-test="delete-confirmation-dialog"]');
- await modal.vm.$emit('cancel');
+ await wrapper.findComponent('[data-test="deleteconfirm"]').vm.$emit('cancel');
expect(wrapper.vm.showConfirmationDialog).toBe(false);
});
@@ -144,8 +143,7 @@ describe('trashModal', () => {
const deleteContentNodes = jest.spyOn(wrapper.vm, 'deleteContentNodes');
deleteContentNodes.mockImplementation(() => Promise.resolve());
await wrapper.setData({ selected, showConfirmationDialog: true });
- const modal = wrapper.find('[data-test="delete-confirmation-dialog"]');
- await modal.vm.$emit('submit');
+ await wrapper.findComponent('[data-test="deleteconfirm"]').vm.$emit('submit');
expect(deleteContentNodes).toHaveBeenCalledWith(selected);
});
});
From a6d84e90fcd551071427a2194a7b1a05c8a1eeb0 Mon Sep 17 00:00:00 2001
From: z-ABYa <189abhish@gmail.com>
Date: Tue, 4 Nov 2025 21:17:41 +0530
Subject: [PATCH 5/5] reverted to previous structure
---
.../channelEdit/views/trash/TrashModal.vue | 301 +++++++++---------
1 file changed, 152 insertions(+), 149 deletions(-)
diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
index 4fe8782773..30204b1fa6 100644
--- a/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
+++ b/contentcuration/contentcuration/frontend/channelEdit/views/trash/TrashModal.vue
@@ -1,170 +1,173 @@
-
-
-
+
-
- {{ $tr('trashEmptyText') }}
-
-
- {{ $tr('trashEmptySubtext') }}
-
-
-
+
-
+ {{ $tr('trashEmptyText') }}
+
+
+ {{ $tr('trashEmptySubtext') }}
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ props.header.text }}
+
+
+
{{ props.header.text }}
-
-
-
- {{ props.header.text }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+ |
+
-
-
-
-
-
-
- |
-
- {{ $formatRelative(item.modified, { now: new Date() }) }}
- |
-
-
-
-
-
- {{ showMoreLabel }}
-
-
-
-
-
-
-
-
- {{ getSelectedTopicAndResourceCountText(selected) }}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ |
+
+ {{ $formatRelative(item.modified, { now: new Date() }) }}
+ |
+
+
+
+
+
+ {{ showMoreLabel }}
+
+
+
+
+
-
-
-
- {{ $tr('deleteConfirmationText') }}
-
+
+
+
+ {{ getSelectedTopicAndResourceCountText(selected) }}
+
+
+
+
+
+
+
+
+ {{ $tr('deleteConfirmationText') }}
+
+
-
+