CASH-2563: Bailout page routing updates
This commit is contained in:
parent
a9086e910b
commit
602591d658
4 changed files with 16 additions and 2 deletions
|
|
@ -36,9 +36,21 @@ describe("bailout.vue", () => {
|
||||||
expect(wrapper.findComponent({ name: "navbar" }).exists()).toBe(true);
|
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 () => {
|
test("arePagePrerequisitesValid should be true ", async () => {
|
||||||
//Arrange
|
//Arrange
|
||||||
const { wrapper } = setupMocks();
|
const { wrapper } = setupMocks();
|
||||||
|
wrapper.vm.getBailoutCodeFromStore = jest.fn().mockReturnValue("BAILOUT_CODE");
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
|
let arePagePrerequisitesValid = wrapper.vm.arePagePrerequisitesValid();
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return true;
|
return this.getBailoutCodeFromStore() !== null;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { routeData } from "@/router/constants/routes";
|
import { routeData } from "@/router/constants/routes";
|
||||||
import { navigationScenarios } from "@/router/constants/navigation-scenarios";
|
import { navigationScenarios } from "@/router/constants/navigation-scenarios";
|
||||||
|
import { FUNNEL_START_PAGE } from "@/router/constants/routes";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { paymentMethods } from "@/constants/payment-method-constants";
|
import { paymentMethods } from "@/constants/payment-method-constants";
|
||||||
|
|
||||||
|
|
@ -828,7 +829,7 @@ const routingTable = function () {
|
||||||
maps: [
|
maps: [
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_BACK_TO_HOMEPAGE,
|
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 = [
|
const exceptionPages = [
|
||||||
FUNNEL_START_PAGE.name,
|
FUNNEL_START_PAGE.name,
|
||||||
routeData.CONFIRMATION.name,
|
routeData.CONFIRMATION.name,
|
||||||
|
routeData.BAILOUT.name,
|
||||||
routeData.BAILOUT_SUCCESS.name,
|
routeData.BAILOUT_SUCCESS.name,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue