Merge pull request #1094 from Safelite/feature/CSR-1112A
Fixed validation issue when switching between appointment types and f…
This commit is contained in:
commit
764e03bf2c
2 changed files with 26 additions and 32 deletions
|
|
@ -435,41 +435,31 @@ describe("shop-question.vue", () => {
|
|||
]);
|
||||
});
|
||||
|
||||
// it("Should display the number of shops necessary to show a previously selected shop", async () => {
|
||||
// // Arrange
|
||||
// const { wrapper } = setupMocks({
|
||||
// mixins: [mockMixin],
|
||||
// props: {
|
||||
// modelValue: {
|
||||
// address: {
|
||||
// city: "POWELL",
|
||||
// country: "US",
|
||||
// state: "OH",
|
||||
// streetAddress: "3938 POWELL RD",
|
||||
// zipCode: "43065",
|
||||
// },
|
||||
// distanceInMiles: 16.2690495685233,
|
||||
// providerNumber: "003341",
|
||||
// },
|
||||
// serviceZipCode: "43081",
|
||||
// selectedAppointmentType: "Dropoff",
|
||||
// cmsWidgetName: cmsWidgetName,
|
||||
// },
|
||||
// mountOptions: {
|
||||
// attachTo: document.body,
|
||||
// },
|
||||
// });
|
||||
it("Should display the number of shops necessary to show a previously selected shop", async () => {
|
||||
// Arrange
|
||||
const { wrapper } = setupMocks({
|
||||
mixins: [mockMixin],
|
||||
props: {
|
||||
modelValue: "003341",
|
||||
serviceZipCode: "43081",
|
||||
selectedAppointmentType: "Dropoff",
|
||||
cmsWidgetName: cmsWidgetName,
|
||||
},
|
||||
mountOptions: {
|
||||
attachTo: document.body,
|
||||
},
|
||||
});
|
||||
|
||||
// // Act
|
||||
// wrapper.vm.initializeComponent(shopQuestionInitialData);
|
||||
// Act
|
||||
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
|
||||
// expect(wrapper.vm.answers.length).toEqual(5);
|
||||
// });
|
||||
// Assert
|
||||
expect(wrapper.vm.answers.length).toEqual(5);
|
||||
});
|
||||
|
||||
it("Should reset the answers when the selected appointment type changes", async () => {
|
||||
// Arrange
|
||||
|
|
|
|||
|
|
@ -170,6 +170,10 @@ export default {
|
|||
this.answers = [];
|
||||
this.shopIndex = 0;
|
||||
this.selectedValue = "";
|
||||
|
||||
if (this.$refs.buttonQuestion) {
|
||||
this.$refs.buttonQuestion.resetField();
|
||||
}
|
||||
},
|
||||
async reloadShopData(serviceZipCode) {
|
||||
const result = await this.loadData(serviceZipCode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue