diff --git a/src/helpers/bailout-helper.js b/src/helpers/bailout-helper.js index e267faa8..0191755d 100644 --- a/src/helpers/bailout-helper.js +++ b/src/helpers/bailout-helper.js @@ -1,6 +1,6 @@ import { useMainStore } from '@/store'; import BailoutCode from '@/constants/bailoutCode'; -import issPageValues from "@/router/router-constants/issPage-values"; +import issPageValues from '@/router/router-constants/issPage-values'; function canBailoutNavigateBack() { const code = useMainStore().pageData(issPageValues.BAILOUT_PAGE)?.bailoutCode; diff --git a/src/layouts/bailout-page/bailout-page.spec.js b/src/layouts/bailout-page/bailout-page.spec.js index 1fb8fd6d..c3feda2c 100644 --- a/src/layouts/bailout-page/bailout-page.spec.js +++ b/src/layouts/bailout-page/bailout-page.spec.js @@ -23,7 +23,8 @@ jest.mock('@/helpers/layout-helper.js', () => jest.fn()); function getMountedComponent(mainInitialState = {}, initialData = {}, methodToRunAfterInitializingStore = () => {}) { const mountOptions = getMountOptions({ router: { - navigate: jest.fn() + navigate: jest.fn(), + navigateWithSpinner: jest.fn() } }); @@ -428,7 +429,7 @@ describe('Bailout page', () => { wrapper.vm.backButtonAction(); // Assert - expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( + expect(wrapper.vm.$router.navigateWithSpinner).toHaveBeenCalledWith( wrapper.vm.navigationScenarios.CLICKED_BACK_PREVIOUS, wrapper.vm.$route ); diff --git a/src/layouts/bailout-page/bailout-page.vue b/src/layouts/bailout-page/bailout-page.vue index b39f505a..e25106b0 100644 --- a/src/layouts/bailout-page/bailout-page.vue +++ b/src/layouts/bailout-page/bailout-page.vue @@ -195,7 +195,7 @@ export default { backButtonAction() { // route to move backwards this.mainStore.resetBailout(); - this.$router.navigate( + this.$router.navigateWithSpinner( this.navigationScenarios.CLICKED_BACK_PREVIOUS, this.$route );