From d5a748cacd4d668e52a05be53e73433f3eac7225 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 8 Nov 2023 15:55:08 -0500 Subject: [PATCH 1/2] Update ctu when updating zip on service-location --- src/layouts/service-location/service-location.vue | 2 ++ .../service-zip-modal-question/service-zip-modal-question.vue | 1 + 2 files changed, 3 insertions(+) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index a2aa0813b..f8efc8c25 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -245,6 +245,7 @@ export default { return { state: this.state, zipCode: this.zipCode, + zipCodeCtu: this.zipCodeCtu, }; }, set: function (newValue) { @@ -256,6 +257,7 @@ export default { this.state = newValue.state; this.zipCode = newValue.zipCode; + this.zipCodeCtu = newValue.zipCodeCtu; this.$nextTick(); }, diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 35276228d..ea6f07818 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -141,6 +141,7 @@ export default { this.resetModalButtonStyle(); } else { this.internalModel.state = zipCodeData.state; + this.internalModel.zipCodeCtu = zipCodeData.zipCodeCtu; // retrieve mobile fee part const serviceZipCode = this.internalModel.zipCode; From a56abad9627e0a8479b0a4dc292d39941dd558d0 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 8 Nov 2023 15:55:19 -0500 Subject: [PATCH 2/2] Unit test changes --- src/layouts/service-location/service-location.spec.js | 6 ++++++ .../service-zip-modal-question.spec.js | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 55ca775c4..eea946b89 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -286,6 +286,7 @@ describe("service-location.vue", () => { const newServiceZipCodeQuestion = { zipCode: "61606", state: "IL", + zipCodeCtu: "01526", }; const serviceZipCodeComponent = wrapper.findComponent({ @@ -316,6 +317,7 @@ describe("service-location.vue", () => { const newServiceZipCodeQuestion = { zipCode: "61606", state: "IL", + zipCodeCtu: "01526", }; const mobileLocationQuestions = { @@ -365,6 +367,7 @@ describe("service-location.vue", () => { const newServiceZipCodeQuestion = { zipCode: "61606", state: "IL", + zipCodeCtu: "01526", }; wrapper.vm.selectedAppointmentType = "Inshop"; @@ -395,6 +398,7 @@ describe("service-location.vue", () => { const newServiceZipCodeQuestion = { zipCode: "45433", state: "OH", + zipCodeCtu: "01526", }; // Act @@ -511,11 +515,13 @@ describe("service-location.vue", () => { wrapper.vm.serviceZipCodeQuestion = { zipCode: "61606", state: "IL", + zipCodeCtu: "01526", }; const newServiceZipCodeInfo = { state: "OH", zipCode: "43081", + zipCodeCtu: "01526", }; // Act diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js index c1ebd65af..7c09836fe 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -113,6 +113,7 @@ describe("service-zip-modal-question.vue", () => { let serviceZipCodeQuestion = { state: "", zipCode: "", + zipCodeCtu: "", }; // Arrange @@ -135,6 +136,7 @@ describe("service-zip-modal-question.vue", () => { let serviceZipCodeQuestion = { state: "OH", zipCode: "43235", + zipCodeCtu: "01820", }; const wrapper = mount(serviceZipModalQuestion, { @@ -156,6 +158,7 @@ describe("service-zip-modal-question.vue", () => { let serviceZipCodeQuestion = { state: "IL", zipCode: "61606", + zipCodeCtu: "01526", }; const zip = "43235"; @@ -176,7 +179,7 @@ describe("service-zip-modal-question.vue", () => { await wrapper.vm.setZipCode(); - let expectedEmit = [[{ state: "OH", zipCode: "43235" }]]; + let expectedEmit = [[{ state: "OH", zipCode: "43235", zipCodeCtu: "01820" }]]; // Assert expect(wrapper.emitted("update:modelValue")).toEqual(expectedEmit); @@ -187,6 +190,7 @@ describe("service-zip-modal-question.vue", () => { let serviceZipCodeQuestion = { state: "IL", zipCode: "61606", + zipCodeCtu: "01526", }; const zip = ""; @@ -214,6 +218,7 @@ describe("service-zip-modal-question.vue", () => { let serviceZipCodeQuestion = { state: "IL", zipCode: "61606", + zipCodeCtu: "01526", }; const zip = "11111"; @@ -241,6 +246,7 @@ describe("service-zip-modal-question.vue", () => { let serviceZipCodeQuestion = { state: "IL", zipCode: "61606", + zipCodeCtu: "01526", }; const zip = ""; @@ -269,6 +275,7 @@ describe("service-zip-modal-question.vue", () => { let serviceZipCodeQuestion = { state: "IL", zipCode: "61606", + zipCodeCtu: "01526", }; const zip = "123";