From be6ed5099b5328ebd8e73e395b9571b347cf0251 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 22 Nov 2024 19:03:11 +0530 Subject: [PATCH 1/5] CSR-2338 Page advance to Schedule page --- .../mobile-location-modal-questions.vue | 10 ++++++++-- src/layouts/service-location/service-location.vue | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 89e095279..84087cb6e 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -97,6 +97,7 @@ export default { "updated-mobile-fee-part", "updated-contains-military-base", "updated-bill-to-account-number", + "mobileLocationSelected", ], data() { return { @@ -286,13 +287,15 @@ export default { // update the page level model this.$emit("update:modelValue", this.internalModel); - this.closeModal(); + //Page advance to Schedule page + this.$emit("mobileLocationSelected"); } } else { // Update the page level model this.$emit("update:modelValue", this.internalModel); - this.closeModal(); + //Page advance to Schedule page + this.$emit("mobileLocationSelected"); } }, }, @@ -305,6 +308,9 @@ export default { deep: true, }, }, + unmounted() { + if (this.isModalOpened) this.closeModal(); + }, components: { textLink, modal, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 9a6e649ec..0496df54c 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -96,7 +96,8 @@ validationRules="mobile-location-required" ref="mobileLocationQuestions" linkWidgetName="MobileLocationLinkWidget" - modalWidgetName="MobileLocationModalWidget" /> + modalWidgetName="MobileLocationModalWidget" + @mobileLocationSelected="forwardButtonAction" /> Date: Fri, 6 Dec 2024 08:35:03 -0500 Subject: [PATCH 2/5] Add logging to debug QA automation failure. Add logging to debug QA automation failure. Kishan reports about 1 out of 10 requests to this endpoint fail running qa regression. --- src/constants/store-actions.js | 2 ++ src/constants/store-mutations.js | 1 + src/layouts/payment-method/payment-method.vue | 7 ++++--- src/router/index.js | 1 + src/store/index.js | 18 +++++++++++++++++- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index c9592c315..41e5896bd 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -102,6 +102,8 @@ const storeActions = { RESET_SUBMITTED_ORDER: "resetSubmittedOrder", RESET_EXTERNAL_PARAMETER_STATE: "resetExternalParameterState", UPDATE_EXTERNAL_PARAMETER_MMS: "updateExternalParameterMMS", + + SAVE_LOGGING_OPTION: "saveLoggingOption", }; export { storeActions }; diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index 02b05bd28..740c5a47e 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -84,6 +84,7 @@ const storeMutations = { UPDATE_STATE_WITH_ORDER_INFORMATION: "updateStateWithOrderInformation", UPDATE_SAVE_SESSION_PROMISE: "updateSaveSessionPromise", UPDATE_LAST_PAGE_VISITED: "updateLastPageVisited", + UPDATE_LOGGING_OPTION: "updateLoggingOption", // EXPERIMENT MUTATIONS UPDATE_EXPERIMENTS: "updateExperiments", diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 78ec4cc84..fa6fd234c 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -47,15 +47,16 @@ v-bind:isDismissible="false" /> -
+

-
+
{ experiments: [], triggeredSiteEntry: false, affiliateCookies: [], + loggingOption: false, }, }; }; @@ -414,6 +415,9 @@ export const mutations = { updateLastPageVisited(state, lastPageVisited) { state.applicationUser.lastPageVisited = lastPageVisited; }, + updateLoggingOption(state, loggingOption) { + state.applicationUser.loggingOption = loggingOption; + }, // EVENT BUS MUTATIONS addEventToBus(state, event) { state.applicationUser.eventBus.push(event); @@ -689,7 +693,9 @@ export const mutations = { !sessionInformation.order.payment.isInsurance && !sessionInformation.order.serviceLocation.provider?.providerNumber ) { - console.log("------------- updateStateWithOrderInformation reset isInsurance -----------------"); + console.log( + "------------- updateStateWithOrderInformation reset isInsurance -----------------" + ); console.log(new Date() + " sessionInformation: " + JSON.stringify(sessionInformation)); state.order.payment.isInsurance = null; } else { @@ -1031,6 +1037,7 @@ export const actions = { endpoint: endpoints.LookupVehicleByVin.url, payload: { vin: vin, // EX "1J4GW58S4XC541166" + logEnabled: context.getters.applicationUser.loggingOption, }, logApiCall: true, pageNameToLog: pageNameToLog, @@ -3016,6 +3023,15 @@ export const actions = { ); }, + saveLoggingOption(context, loggingOption) { + var option = false; + if (loggingOption != null) { + option = loggingOption == "true" ? true : false; + } + + context.commit(storeMutations.UPDATE_LOGGING_OPTION, option); + }, + async getRecalPartsAndSaveToLineItems(context, { pageNameToLog }) { // identify each part that needs recal const glassParts = context.state.order?.lineItems?.glassParts From 57e21e55f05f72c5f6bce126b683ffc60231ddad Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 6 Dec 2024 09:52:49 -0500 Subject: [PATCH 3/5] fix test fix test --- src/store/store.spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 313e7e37f..094793bc1 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -404,6 +404,11 @@ describe("Actions", () => { it("lookupVehicleByVin action, should return car data", async () => { // Arrange const context = state; + context.getters = { + applicationUser: { + loggingOption: false, + }, + }; // Act globalMethods.callHttpClient.mockImplementation(() => { From 2ae25e6bd019e37fce64e76e93b5dcb1f43d2cec Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 6 Dec 2024 10:33:05 -0500 Subject: [PATCH 4/5] cookie date time fix The cookie is storing date time attributes in UTC causing an exception in heritage code when it hits the comma separating parts of the string. ie: SavedSessionTimeoutDate":"Mon, 20 Jan 2025 15:31:51 GMT" --- src/helpers/heritage-integration/cookie-helper.js | 2 +- src/helpers/heritage-integration/session-helper.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/heritage-integration/cookie-helper.js b/src/helpers/heritage-integration/cookie-helper.js index 0bd4ae563..4ff5c0c8e 100644 --- a/src/helpers/heritage-integration/cookie-helper.js +++ b/src/helpers/heritage-integration/cookie-helper.js @@ -13,7 +13,7 @@ export function updateOrCreateFunnelCookie() { // Set up cookie with all the props. setFunnelCookieProperties({ - LastTouched: new Date().toUTCString(), + LastTouched: new Date().toJSON(), SavedSessionTimeoutDate: store.getters.applicationUser.savedSessionTimeout, DidHeritageFunnelUpdateLast: false, ShouldResetState: false, diff --git a/src/helpers/heritage-integration/session-helper.js b/src/helpers/heritage-integration/session-helper.js index 291ebfaf8..d932969d1 100644 --- a/src/helpers/heritage-integration/session-helper.js +++ b/src/helpers/heritage-integration/session-helper.js @@ -43,5 +43,5 @@ Function to calculate the date for the saved session timeout. export function getDateForSavedSessionTimeout() { const currentDate = new Date(new Date().toUTCString()); currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS); - return currentDate.toUTCString(); + return currentDate.toJSON(); } From b02cbf5ceb73e1c789912ed9b5f2fb80b968b021 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 6 Dec 2024 10:54:09 -0500 Subject: [PATCH 5/5] test fix test fix --- src/helpers/heritage-integration/session-helper.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/heritage-integration/session-helper.spec.js b/src/helpers/heritage-integration/session-helper.spec.js index fe3e308da..11440c544 100644 --- a/src/helpers/heritage-integration/session-helper.spec.js +++ b/src/helpers/heritage-integration/session-helper.spec.js @@ -81,7 +81,7 @@ describe("getDateForSavedSessionTimeout", () => { currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS); // Act - const result = getDateForSavedSessionTimeout(); + const result = new Date(getDateForSavedSessionTimeout()).toUTCString(); // Assert expect(result).toEqual(currentDate.toUTCString());