Merge pull request #1503 from Safelite/feature/CSR-1766

Feature/csr 1766
This commit is contained in:
chloeherdsafelite 2023-11-08 16:08:27 -05:00 committed by GitHub
commit e1d7f18036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 1 deletions

View file

@ -286,6 +286,7 @@ describe("service-location.vue", () => {
const newServiceZipCodeQuestion = { const newServiceZipCodeQuestion = {
zipCode: "61606", zipCode: "61606",
state: "IL", state: "IL",
zipCodeCtu: "01526",
}; };
const serviceZipCodeComponent = wrapper.findComponent({ const serviceZipCodeComponent = wrapper.findComponent({
@ -316,6 +317,7 @@ describe("service-location.vue", () => {
const newServiceZipCodeQuestion = { const newServiceZipCodeQuestion = {
zipCode: "61606", zipCode: "61606",
state: "IL", state: "IL",
zipCodeCtu: "01526",
}; };
const mobileLocationQuestions = { const mobileLocationQuestions = {
@ -365,6 +367,7 @@ describe("service-location.vue", () => {
const newServiceZipCodeQuestion = { const newServiceZipCodeQuestion = {
zipCode: "61606", zipCode: "61606",
state: "IL", state: "IL",
zipCodeCtu: "01526",
}; };
wrapper.vm.selectedAppointmentType = "Inshop"; wrapper.vm.selectedAppointmentType = "Inshop";
@ -395,6 +398,7 @@ describe("service-location.vue", () => {
const newServiceZipCodeQuestion = { const newServiceZipCodeQuestion = {
zipCode: "45433", zipCode: "45433",
state: "OH", state: "OH",
zipCodeCtu: "01526",
}; };
// Act // Act
@ -511,11 +515,13 @@ describe("service-location.vue", () => {
wrapper.vm.serviceZipCodeQuestion = { wrapper.vm.serviceZipCodeQuestion = {
zipCode: "61606", zipCode: "61606",
state: "IL", state: "IL",
zipCodeCtu: "01526",
}; };
const newServiceZipCodeInfo = { const newServiceZipCodeInfo = {
state: "OH", state: "OH",
zipCode: "43081", zipCode: "43081",
zipCodeCtu: "01526",
}; };
// Act // Act

View file

@ -245,6 +245,7 @@ export default {
return { return {
state: this.state, state: this.state,
zipCode: this.zipCode, zipCode: this.zipCode,
zipCodeCtu: this.zipCodeCtu,
}; };
}, },
set: function (newValue) { set: function (newValue) {
@ -256,6 +257,7 @@ export default {
this.state = newValue.state; this.state = newValue.state;
this.zipCode = newValue.zipCode; this.zipCode = newValue.zipCode;
this.zipCodeCtu = newValue.zipCodeCtu;
this.$nextTick(); this.$nextTick();
}, },

View file

@ -113,6 +113,7 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = { let serviceZipCodeQuestion = {
state: "", state: "",
zipCode: "", zipCode: "",
zipCodeCtu: "",
}; };
// Arrange // Arrange
@ -135,6 +136,7 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = { let serviceZipCodeQuestion = {
state: "OH", state: "OH",
zipCode: "43235", zipCode: "43235",
zipCodeCtu: "01820",
}; };
const wrapper = mount(serviceZipModalQuestion, { const wrapper = mount(serviceZipModalQuestion, {
@ -156,6 +158,7 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = { let serviceZipCodeQuestion = {
state: "IL", state: "IL",
zipCode: "61606", zipCode: "61606",
zipCodeCtu: "01526",
}; };
const zip = "43235"; const zip = "43235";
@ -176,7 +179,7 @@ describe("service-zip-modal-question.vue", () => {
await wrapper.vm.setZipCode(); await wrapper.vm.setZipCode();
let expectedEmit = [[{ state: "OH", zipCode: "43235" }]]; let expectedEmit = [[{ state: "OH", zipCode: "43235", zipCodeCtu: "01820" }]];
// Assert // Assert
expect(wrapper.emitted("update:modelValue")).toEqual(expectedEmit); expect(wrapper.emitted("update:modelValue")).toEqual(expectedEmit);
@ -187,6 +190,7 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = { let serviceZipCodeQuestion = {
state: "IL", state: "IL",
zipCode: "61606", zipCode: "61606",
zipCodeCtu: "01526",
}; };
const zip = ""; const zip = "";
@ -214,6 +218,7 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = { let serviceZipCodeQuestion = {
state: "IL", state: "IL",
zipCode: "61606", zipCode: "61606",
zipCodeCtu: "01526",
}; };
const zip = "11111"; const zip = "11111";
@ -241,6 +246,7 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = { let serviceZipCodeQuestion = {
state: "IL", state: "IL",
zipCode: "61606", zipCode: "61606",
zipCodeCtu: "01526",
}; };
const zip = ""; const zip = "";
@ -269,6 +275,7 @@ describe("service-zip-modal-question.vue", () => {
let serviceZipCodeQuestion = { let serviceZipCodeQuestion = {
state: "IL", state: "IL",
zipCode: "61606", zipCode: "61606",
zipCodeCtu: "01526",
}; };
const zip = "123"; const zip = "123";

View file

@ -141,6 +141,7 @@ export default {
this.resetModalButtonStyle(); this.resetModalButtonStyle();
} else { } else {
this.internalModel.state = zipCodeData.state; this.internalModel.state = zipCodeData.state;
this.internalModel.zipCodeCtu = zipCodeData.zipCodeCtu;
// retrieve mobile fee part // retrieve mobile fee part
const serviceZipCode = this.internalModel.zipCode; const serviceZipCode = this.internalModel.zipCode;