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 = {
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

View file

@ -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();
},

View file

@ -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";

View file

@ -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;