Skip to content

Commit

Permalink
Renaming the RosalutionToast to ToastDialog to correspond with the ot…
Browse files Browse the repository at this point in the history
…her dialog components
  • Loading branch information
SeriousHorncat committed Nov 8, 2024
1 parent ffe8ad8 commit 3661b09
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions frontend/src/views/AnalysisView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
data-test="analysis-view-header"
>
</AnalysisViewHeader>
<RosalutionToast data-test="toast" ref="rosalution-toast"/>
<ToastDialog data-test="toast" ref="rosalution-toast"/>
</app-header>
<app-content>
<GeneBox
Expand Down Expand Up @@ -77,7 +77,7 @@ import SectionBox from '@/components/AnalysisView/SectionBox.vue';
import GeneBox from '@/components/AnalysisView/GeneBox.vue';
import InputDialog from '@/components/Dialogs/InputDialog.vue';
import NotificationDialog from '@/components/Dialogs/NotificationDialog.vue';
import RosalutionToast from '@/components/Dialogs/RosalutionToast.vue';
import ToastDialog from '@/components/Dialogs/ToastDialog.vue';
import SupplementalFormList from '@/components/AnalysisView/SupplementalFormList.vue';
import SaveModal from '@/components/AnalysisView/SaveModal.vue';
import DiscussionSection from '@/components/AnalysisView/DiscussionSection.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import sinon from 'sinon';

import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';

import RosalutionToast from '@/components/Dialogs/RosalutionToast.vue';
import ToastDialog from '@/components/Dialogs/ToastDialog.vue';

describe('Toast.vue', () => {
let wrapper;
Expand All @@ -16,7 +16,7 @@ describe('Toast.vue', () => {
});

beforeEach(() => {
wrapper = shallowMount(RosalutionToast, {
wrapper = shallowMount(ToastDialog, {
global: {
components: {
'font-awesome-icon': FontAwesomeIcon,
Expand Down
18 changes: 9 additions & 9 deletions frontend/test/views/AnalysisView.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import InputDialog from '@/components/Dialogs/InputDialog.vue';
import NotificationDialog from '@/components/Dialogs/NotificationDialog.vue';
import DiscussionSection from '@/components/AnalysisView/DiscussionSection.vue';
import SupplementalFormList from '@/components/AnalysisView/SupplementalFormList.vue';
import RosalutionToast from '@/components/Dialogs/RosalutionToast.vue';
import ToastDialog from '@/components/Dialogs/ToastDialog.vue';
import SaveModal from '@/components/AnalysisView/SaveModal.vue';

import {authStore} from '@/stores/authStore.js';
Expand Down Expand Up @@ -48,7 +48,7 @@ function getMountedComponent(props) {
},
stubs: {
transition: false,
RosalutionToast: false,
ToastDialog: false,
},
},
});
Expand Down Expand Up @@ -179,7 +179,7 @@ describe('AnalysisView', () => {

await geneBox.vm.$emit('clipboard-copy', 'NM_001017980.3:c.164G>T');

const toastWrapper = wrapper.getComponent(RosalutionToast);
const toastWrapper = wrapper.getComponent(ToastDialog);

expect(toastWrapper.text()).to.contain('Success');
expect(toastWrapper.text()).to.contain('Copied NM_001017980.3:c.164G>T to clipboard!');
Expand Down Expand Up @@ -211,7 +211,7 @@ describe('AnalysisView', () => {
await triggerAction(wrapper, 'Mark Ready');
await wrapper.vm.$nextTick();

const toastWrapper = wrapper.getComponent(RosalutionToast);
const toastWrapper = wrapper.getComponent(ToastDialog);
expect(toastWrapper.text()).to.contain('Analysis event \'ready\' successful.');
});

Expand All @@ -228,7 +228,7 @@ describe('AnalysisView', () => {

await wrapper.vm.$nextTick();

const toastWrapper = wrapper.getComponent(RosalutionToast);
const toastWrapper = wrapper.getComponent(ToastDialog);
expect(toastWrapper.text()).to.contain('Error updating the event \'ready\'.');
expect(toastWrapper.text()).to.contain('Error');

Expand All @@ -241,7 +241,7 @@ describe('AnalysisView', () => {
await triggerAction(wrapper, 'Mark Active');
await wrapper.vm.$nextTick();

const toastWrapper = wrapper.getComponent(RosalutionToast);
const toastWrapper = wrapper.getComponent(ToastDialog);
expect(toastWrapper.text()).to.contain('Success');
expect(toastWrapper.text()).to.contain('Analysis event \'opened\' successful.');
});
Expand All @@ -250,7 +250,7 @@ describe('AnalysisView', () => {
triggerAction(wrapper, 'Edit');
await wrapper.vm.$nextTick();

const toastWrapper = wrapper.getComponent(RosalutionToast);
const toastWrapper = wrapper.getComponent(ToastDialog);
expect(toastWrapper.text()).to.contain('Edit mode has been enabled.');
expect(toastWrapper.text()).to.contain('Success');

Expand All @@ -265,7 +265,7 @@ describe('AnalysisView', () => {
// Disabling the 'edit mode and notifying edits haven't been made
await triggerAction(wrapper, 'Edit');

const toastWrapper = wrapper.getComponent(RosalutionToast);
const toastWrapper = wrapper.getComponent(ToastDialog);
expect(toastWrapper.text()).to.contain('Edit mode has been disabled and changes have not been saved.');
expect(toastWrapper.text()).to.contain('Info');
});
Expand Down Expand Up @@ -733,7 +733,7 @@ describe('AnalysisView', () => {
await triggerAction(wrapper, 'Edit');
await wrapper.vm.$nextTick();

const toastWrapper = wrapper.getComponent(RosalutionToast);
const toastWrapper = wrapper.getComponent(ToastDialog);
expect(toastWrapper.text()).to.contain('Edit mode has been enabled.');

const saveModal = wrapper.findComponent(SaveModal);
Expand Down

0 comments on commit 3661b09

Please sign in to comment.