diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelInvitation.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelInvitation.vue
index 8fef4ecee4..b8126e2069 100644
--- a/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelInvitation.vue
+++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelInvitation.vue
@@ -1,75 +1,53 @@
-
-
- {{ invitationText }}
-
-
-
-
-
-
-
-
-
-
- {{ $tr('accept') }}
-
-
-
-
-
-
-
-
-
- {{ $tr('decline') }}
-
-
-
-
-
+
+
+ {{ invitationText }}
+
+
+
+
+
-
-
-
- {{ $tr('cancel') }}
-
-
- {{ $tr('decline') }}
-
+
+ {{ $tr('decliningInvitationMessage') }}
-
+
@@ -79,13 +57,9 @@
import { mapActions, mapGetters } from 'vuex';
import { InvitationShareModes } from '../../constants';
- import MessageDialog from 'shared/views/MessageDialog';
export default {
name: 'ChannelInvitation',
- components: {
- MessageDialog,
- },
props: {
invitationID: {
type: String,
@@ -134,6 +108,9 @@
this.$store.dispatch('showSnackbarSimple', this.$tr('declinedSnackbar'));
});
},
+ close() {
+ this.dialog = false;
+ },
},
$trs: {
editText: '{sender} has invited you to edit {channel}',
@@ -152,7 +129,7 @@
-
diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/channelInvitation.spec.js b/contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/channelInvitation.spec.js
index 42a2e9a922..b88f689a48 100644
--- a/contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/channelInvitation.spec.js
+++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/__tests__/channelInvitation.spec.js
@@ -42,9 +42,13 @@ describe('channelInvitation', () => {
});
it('clicking on the decline button should decline the invitation', async () => {
+ await wrapper.find('[data-test="decline"]').trigger('click');
const declineInvitation = jest.spyOn(wrapper.vm, 'declineInvitation');
declineInvitation.mockImplementation(() => Promise.resolve());
- await wrapper.find('[data-test="decline-close"]').trigger('click');
+ await wrapper
+ .findComponent('[data-testid="channel-invitation-modal"]')
+ .find('form')
+ .trigger('submit');
expect(declineInvitation).toHaveBeenCalledWith(invitationID);
});
});
diff --git a/contentcuration/contentcuration/frontend/channelList/views/ChannelListIndex.vue b/contentcuration/contentcuration/frontend/channelList/views/ChannelListIndex.vue
index c1d29c75ec..f1f7715235 100644
--- a/contentcuration/contentcuration/frontend/channelList/views/ChannelListIndex.vue
+++ b/contentcuration/contentcuration/frontend/channelList/views/ChannelListIndex.vue
@@ -88,21 +88,23 @@
md8
lg6
>
-
-
-
- {{ $tr('invitations', { count: invitationList.length }) }}
-
-
-
-
+
+ {{ $tr('invitations', { count: invitationList.length }) }}
+
+
+
+
+
diff --git a/contentcuration/contentcuration/frontend/shared/views/StudioRaisedBox.vue b/contentcuration/contentcuration/frontend/shared/views/StudioRaisedBox.vue
new file mode 100644
index 0000000000..9ae6cc75e7
--- /dev/null
+++ b/contentcuration/contentcuration/frontend/shared/views/StudioRaisedBox.vue
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/contentcuration/contentcuration/frontend/shared/views/__tests__/StudioRaisedBox.spec.js b/contentcuration/contentcuration/frontend/shared/views/__tests__/StudioRaisedBox.spec.js
new file mode 100644
index 0000000000..458dfa8137
--- /dev/null
+++ b/contentcuration/contentcuration/frontend/shared/views/__tests__/StudioRaisedBox.spec.js
@@ -0,0 +1,20 @@
+import { render, screen } from '@testing-library/vue';
+import VueRouter from 'vue-router';
+import StudioRaisedBox from '../StudioRaisedBox.vue';
+
+describe('StudioRaisedBox', () => {
+ test('renders both header and main slots', () => {
+ const headerContent = 'Header Title';
+ const mainContent = 'Main content area';
+ render(StudioRaisedBox, {
+ props: {},
+ routes: new VueRouter(),
+ slots: {
+ header: headerContent,
+ main: mainContent,
+ },
+ });
+ expect(screen.getByText(headerContent)).toBeInTheDocument();
+ expect(screen.getByText(mainContent)).toBeInTheDocument();
+ });
+});