From 4c84dee019b96c23adbaf50be8a8a7597a0a72fd Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 3 Jun 2024 09:13:49 -0400 Subject: [PATCH 1/3] Add spinner to bailout back button. --- src/layouts/bailout-page/bailout-page.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); From d16efef1fc8acf56974f3af5ad21c352caa8758c Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 3 Jun 2024 09:20:05 -0400 Subject: [PATCH 2/3] fix test --- src/layouts/bailout-page/bailout-page.spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ); From 63e596f5a32aeb0c2a86d7e751fbc2b3b7ddc6f8 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Mon, 3 Jun 2024 09:21:13 -0400 Subject: [PATCH 3/3] tossing a quick linting fix in as well --- src/helpers/bailout-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;