Merge pull request #321 from Safelite/feature/digital/SSR-481

Feature/digital/ssr 481
This commit is contained in:
katiekroell 2023-05-22 16:51:46 -04:00 committed by GitHub
commit f142c829b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 26 deletions

View file

@ -183,6 +183,9 @@ export default {
},
},
},
mounted() {
this.$emit("textboxQuestionEvent.inputIdAssigned", this.inputId);
},
watch: {
async value(newValue) {
const result = await validate(newValue, this.validationRules); // do a test validation check, without triggering full validation

View file

@ -113,28 +113,6 @@ describe("updating service zip", () => {
expect(wrapper.vm.serviceZipCodeQuestion).toStrictEqual(newServiceZipCodeQuestion);
});
test("resets appointment type selection when service zip code is updated by service zip modal", () => {
// Arrange
const { wrapper } = setupMocks({});
const serviceZipCodeComponent = wrapper.findComponent({
ref: "serviceZipCodeQuestion",
});
const newServiceZipCodeQuestion = {
zipCode: "61606",
state: "IL",
};
wrapper.vm.selectedAppointmentType = "Inshop";
// Act
serviceZipCodeComponent.vm.$emit("update:modelValue", newServiceZipCodeQuestion);
// Assert
expect(wrapper.vm.selectedAppointmentType).toStrictEqual(null);
});
test("displays military zip message when zip is updated", () => {
// Arrange
const { wrapper } = setupMocks({});

View file

@ -146,10 +146,6 @@ export default {
};
},
set: function (newValue) {
if (newValue.zipCode !== this.zipCode) {
this.selectedAppointmentType = null;
}
this.zipCode = newValue.zipCode;
this.state = newValue.state;