Merge pull request #3178 from Safelite/feature/CASH-2563
Feature/CASH 2563
This commit is contained in:
commit
c3df885b28
4 changed files with 16 additions and 2 deletions
|
|
@ -36,9 +36,21 @@ describe("bailout.vue", () => {
|
|||
expect(wrapper.findComponent({ name: "navbar" }).exists()).toBe(true);
|
||||
});
|
||||
|
||||
test("arePagePrerequisitesValid should be false ", async () => {
|
||||
//Arrange
|
||||
const { wrapper } = setupMocks();
|
||||
|
||||
//Act
|
||||
let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
|
||||
|
||||
//Assert
|
||||
expect(arePagePrerequisitesValid).toBe(false);
|
||||
});
|
||||
|
||||
test("arePagePrerequisitesValid should be true ", async () => {
|
||||
//Arrange
|
||||
const { wrapper } = setupMocks();
|
||||
wrapper.vm.getBailoutCodeFromStore = jest.fn().mockReturnValue("BAILOUT_CODE");
|
||||
|
||||
//Act
|
||||
let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ export default {
|
|||
}
|
||||
},
|
||||
arePagePrerequisitesValid() {
|
||||
return true;
|
||||
return this.getBailoutCodeFromStore() !== null;
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { routeData } from "@/router/constants/routes";
|
||||
import { navigationScenarios } from "@/router/constants/navigation-scenarios";
|
||||
import { FUNNEL_START_PAGE } from "@/router/constants/routes";
|
||||
import store from "@/store";
|
||||
import { paymentMethods } from "@/constants/payment-method-constants";
|
||||
|
||||
|
|
@ -828,7 +829,7 @@ const routingTable = function () {
|
|||
maps: [
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK_TO_HOMEPAGE,
|
||||
destinationPageData: routeData.RESTART,
|
||||
destinationPageData: FUNNEL_START_PAGE,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ export async function beforeEach(to, from) {
|
|||
const exceptionPages = [
|
||||
FUNNEL_START_PAGE.name,
|
||||
routeData.CONFIRMATION.name,
|
||||
routeData.BAILOUT.name,
|
||||
routeData.BAILOUT_SUCCESS.name,
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue