Merge pull request #2412 from Safelite/feature/CASH-489

CASH-489
This commit is contained in:
Johnny Shultz 2025-04-10 13:24:41 -04:00 committed by GitHub
commit 6dfdcdf4b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 81 additions and 3 deletions

View file

@ -264,6 +264,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -313,6 +319,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -360,6 +372,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -404,6 +422,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -449,6 +473,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -494,6 +524,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -540,6 +576,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -588,6 +630,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -634,6 +682,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -681,6 +735,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},
@ -780,6 +840,12 @@ describe("quote.vue", () => {
lineItems: {
glassParts: ["item", "item2"],
},
pageData: jest.fn((page) => {
if (page === "quote") {
return { saveProgressPopupSkipped: true };
}
return {};
}),
applicationUser: {
experiments: [],
},

View file

@ -166,6 +166,7 @@ import {
getDeviceIdValue,
} from "@/helpers/heritage-integration/cookie-helper";
import { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
@ -242,7 +243,9 @@ export default {
const resultMap = await settleAllPromises(promiseResultMap);
const emailFromStore = store.getters.order.customer.emailAddress;
const isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
const showSaveProgressPopup = isEmailInStoreOnPageLoad ? false : true;
const isPopupSkipped =
store.getters.pageData(fmgPageValues.QUOTE).saveProgressPopupSkipped === true;
const showSaveProgressPopup = isEmailInStoreOnPageLoad || isPopupSkipped ? false : true;
const showSaveProgressModal = isEmailInStoreOnPageLoad ? false : true;
const shouldSkipToInsurance =
getBoolFromString(
@ -626,6 +629,15 @@ export default {
async closeSaveProgressPopup() {
this.showSaveProgressPopup = false;
await this.dispatchStoreAction(
storeActions.SAVE_PAGE_DATA,
{
page: fmgPageValues.QUOTE,
data: { saveProgressPopupSkipped: true },
},
false
);
if (this.skipToInsurance) {
// skip ahead now if in IGQ skip experiment
await this.skip(true, externalParamPackageLabels.GLASS_ONLY);

View file

@ -3217,8 +3217,8 @@ export const actions = {
context.commit(storeMutations.UPDATE_CUSTOMER_WAITLIST_REQUESTED, waitListRequested);
},
savePageData(context, emailOrSms) {
context.commit(storeMutations.UPDATE_PAGE_DATA, emailOrSms);
savePageData(context, pageData) {
context.commit(storeMutations.UPDATE_PAGE_DATA, pageData);
},
saveVin(context, { isSelectedGlassAvailableForVehicle, vehicleInfo }) {