Merge pull request #3178 from Safelite/feature/CASH-2563

Feature/CASH 2563
This commit is contained in:
Chris 2026-05-14 12:01:59 -04:00 committed by GitHub
commit c3df885b28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 2 deletions

View file

@ -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();

View file

@ -244,7 +244,7 @@ export default {
}
},
arePagePrerequisitesValid() {
return true;
return this.getBailoutCodeFromStore() !== null;
},
},

View file

@ -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,
},
],
},

View file

@ -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,
];