Merge pull request #729 from Safelite/feature/richardson/SSR-1279
Add spinner to bailout back button.
This commit is contained in:
commit
685ea1eb04
3 changed files with 5 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue