Merge pull request #1094 from Safelite/feature/CSR-1112A

Fixed validation issue when switching between appointment types and f…
This commit is contained in:
Leah Schumann 2023-05-12 08:02:21 -04:00 committed by GitHub
commit 764e03bf2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 32 deletions

View file

@ -435,41 +435,31 @@ describe("shop-question.vue", () => {
]); ]);
}); });
// it("Should display the number of shops necessary to show a previously selected shop", async () => { it("Should display the number of shops necessary to show a previously selected shop", async () => {
// // Arrange // Arrange
// const { wrapper } = setupMocks({ const { wrapper } = setupMocks({
// mixins: [mockMixin], mixins: [mockMixin],
// props: { props: {
// modelValue: { modelValue: "003341",
// address: { serviceZipCode: "43081",
// city: "POWELL", selectedAppointmentType: "Dropoff",
// country: "US", cmsWidgetName: cmsWidgetName,
// state: "OH", },
// streetAddress: "3938 POWELL RD", mountOptions: {
// zipCode: "43065", attachTo: document.body,
// }, },
// distanceInMiles: 16.2690495685233, });
// providerNumber: "003341",
// },
// serviceZipCode: "43081",
// selectedAppointmentType: "Dropoff",
// cmsWidgetName: cmsWidgetName,
// },
// mountOptions: {
// attachTo: document.body,
// },
// });
// // Act // Act
// wrapper.vm.initializeComponent(shopQuestionInitialData); wrapper.vm.initializeComponent(shopQuestionInitialData);
// await wrapper.vm.$nextTick(); await wrapper.vm.$nextTick();
// await wrapper.vm.$nextTick(); await wrapper.vm.$nextTick();
// await wrapper.vm.$nextTick(); await wrapper.vm.$nextTick();
// // Assert // Assert
// expect(wrapper.vm.answers.length).toEqual(5); expect(wrapper.vm.answers.length).toEqual(5);
// }); });
it("Should reset the answers when the selected appointment type changes", async () => { it("Should reset the answers when the selected appointment type changes", async () => {
// Arrange // Arrange

View file

@ -170,6 +170,10 @@ export default {
this.answers = []; this.answers = [];
this.shopIndex = 0; this.shopIndex = 0;
this.selectedValue = ""; this.selectedValue = "";
if (this.$refs.buttonQuestion) {
this.$refs.buttonQuestion.resetField();
}
}, },
async reloadShopData(serviceZipCode) { async reloadShopData(serviceZipCode) {
const result = await this.loadData(serviceZipCode); const result = await this.loadData(serviceZipCode);