From c5baea4f8c86856a2764854729b774b51b54952e Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 30 Apr 2025 11:32:25 -0400 Subject: [PATCH 1/5] Revert "CASH-376 form validation fix" This reverts commit 7d99e9c5f4ac06a55cd4af0a31ca12af1b3089df. --- .../mobile-location-modal-questions.vue | 1 - .../service-location/service-location.spec.js | 7 ------- src/layouts/service-location/service-location.vue | 12 +++++------- 3 files changed, 5 insertions(+), 15 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 ac597c72b..5b0a79255 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 @@ -148,7 +148,6 @@ export default { zipCode: "", }, isVehicleProtected: null, - isMobileSelected: false, }), }, mobileFeePart: { diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 1b33f7064..69f49fe9d 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -353,7 +353,6 @@ describe("service-location.vue", () => { zipCode: "43054", }, isVehicleProtected: true, - isMobileSelected: true, }; wrapper.vm.mobileLocationQuestions = mobileLocationQuestions; @@ -366,7 +365,6 @@ describe("service-location.vue", () => { zipCode: "61606", }, isVehicleProtected: null, - isMobileSelected: false, }; // Act @@ -469,7 +467,6 @@ describe("service-location.vue", () => { zipCode: "", }, isVehicleProtected: null, - isMobileSelected: false, }; wrapper.vm.mobileLocationQuestions = mobileLocationQuestions; const newMobileLocationQuestions = { @@ -481,7 +478,6 @@ describe("service-location.vue", () => { zipCode: "43054", }, isVehicleProtected: true, - isMobileSelected: true, }; wrapper.vm.closeModalAction = jest.fn(); @@ -531,7 +527,6 @@ describe("service-location.vue", () => { zipCode: "", }, isVehicleProtected: null, - isMobileSelected: false, mobileFeePart: null, }; wrapper.vm.mobileLocationQuestions = mobileLocationQuestions; @@ -545,7 +540,6 @@ describe("service-location.vue", () => { zipCode: "43081", }, isVehicleProtected: true, - isMobileSelected: true, mobileFeePart: null, }; @@ -609,7 +603,6 @@ describe("service-location.vue", () => { zipCode: "43081", }, isVehicleProtected: "YesAnswer", - isMobileSelected: true, }; wrapper.vm.closeModalAction = jest.fn(); diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index cf6ffa043..02066d97e 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -171,12 +171,11 @@ const MOBILE_FEE_PART_TYPE = "MOBILE FEE"; // DEFINE VALIDATION RULES defineRule("mobile-location-required", (value) => { if ( - value.isMobileSelected && - (!value.addressQuestions.streetAddress || - !value.addressQuestions.city || - !value.addressQuestions.state || - !value.addressQuestions.zipCode || - !value.isVehicleProtected) + !value.addressQuestions.streetAddress || + !value.addressQuestions.city || + !value.addressQuestions.state || + !value.addressQuestions.zipCode || + !value.isVehicleProtected ) { return errorMessages.MOBILE_LOCATION_REQUIRED; } @@ -298,7 +297,6 @@ export default { zipCode: this.zipCode, }, isVehicleProtected: this.isVehicleProtected, - isMobileSelected: this.selectedAppointmentType === "Mobile", }; }, }, From 32626e998d1de8d973ef1c5cc8022034fcbbeaef Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 30 Apr 2025 11:33:49 -0400 Subject: [PATCH 2/5] Revert "CASH-376 unit test fix" This reverts commit 3ccb294a366789ff6fb20f01517d4da3bb76eace. --- src/layouts/service-location/service-location.spec.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 69f49fe9d..515ae7e64 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -1443,7 +1443,5 @@ function setupMocks({ mountOptionsMockData = {} }) { const mountOptions = getMountOptions(mountOptionsMockData); const wrapper = shallowMount(serviceLocation, mountOptions); wrapper.vm.setCmsContent = baseMixin.methods.setCmsContent; - wrapper.vm.$refs.mobileLocationQuestions.isMobileAddressComplete = jest.fn(); - wrapper.vm.$refs.mobileLocationQuestions.openModal = jest.fn(); return { wrapper, apiPromise }; } From 9a6a2fa0d0f1661ade62a4d09ab2d3c3df943879 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 30 Apr 2025 11:34:02 -0400 Subject: [PATCH 3/5] Revert "CASH-376 added mock for isMobileAddressComplete" This reverts commit 501e16303fdd62d51c32cace47da9fd05c5d3e26. --- src/layouts/service-location/service-location.spec.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 515ae7e64..7dccc1b1e 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -81,16 +81,6 @@ jest.mock( }) ); -jest.mock( - "@/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue", - () => ({ - isMobileAddressComplete: jest.fn(() => { - return true; - }), - openModal: jest.fn(), - }) -); - jest.spyOn(baseMixin.methods, "getZipCodeData").mockImplementation((serviceZipCode) => { return new Promise((resolve) => { let mockContainsMilitaryBase = false; From 59a8202ad2116af404cd24ae2eff85ec1f232d3d Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 30 Apr 2025 11:34:32 -0400 Subject: [PATCH 4/5] Revert "CASH-376 removing transition prevents rendering CTA on top of modal" This reverts commit 6fa7dcb364bd4979d50c1ff4be57a55586c4808a. --- .../mobile-location-modal-questions.vue | 130 +++++++++--------- 1 file changed, 66 insertions(+), 64 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 5b0a79255..96977dd2b 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 @@ -1,70 +1,72 @@