diff --git a/src/layouts/vehicle-make/make-question/make-question.spec.js b/src/layouts/vehicle-make/make-question/make-question.spec.js index 84dd4f7e8..6a811459f 100644 --- a/src/layouts/vehicle-make/make-question/make-question.spec.js +++ b/src/layouts/vehicle-make/make-question/make-question.spec.js @@ -12,11 +12,11 @@ describe("make-question.vue", () => { const makeToSelect = "ford"; //Act - wrapper.setData({ selectedMake: makeToSelect }); + wrapper.setValue({ selectedMake: makeToSelect }); await wrapper.vm.$nextTick(); //Assert - expect(wrapper.emitted()["update:modelValue"][0]).toEqual(["ford"]); + expect(wrapper.emitted()["update:modelValue"][0]).toEqual([{selectedMake: "ford"}]); }); }); diff --git a/src/layouts/vehicle-make/make-question/make-question.vue b/src/layouts/vehicle-make/make-question/make-question.vue index 1e5ac38c7..ac6ff45bb 100644 --- a/src/layouts/vehicle-make/make-question/make-question.vue +++ b/src/layouts/vehicle-make/make-question/make-question.vue @@ -3,7 +3,7 @@ :questionText="questionText" :answers="makes" groupName="Choose Vehicle Make" - v-model="selectedMake" + v-model="modelValue" /> @@ -19,7 +19,6 @@ export default { data() { return { questionText: null, - selectedMake: null, makes: Array, } }, @@ -39,7 +38,7 @@ export default { } }, watch: { - selectedMake(val) { + modelValue(val) { this.$emit("update:modelValue", val); } }, diff --git a/src/layouts/vehicle-model/model-question/model-question.spec.js b/src/layouts/vehicle-model/model-question/model-question.spec.js index d6259eb72..e067cef37 100644 --- a/src/layouts/vehicle-model/model-question/model-question.spec.js +++ b/src/layouts/vehicle-model/model-question/model-question.spec.js @@ -12,11 +12,11 @@ describe("model-question.vue", () => { const modelToSelect = "Civic"; //Act - wrapper.setData({ selectedModel: modelToSelect }); + wrapper.setValue({ selectedModel: modelToSelect }); await wrapper.vm.$nextTick(); //Assert - expect(wrapper.emitted()["update:modelValue"][0]).toEqual(["Civic"]); + expect(wrapper.emitted()["update:modelValue"][0]).toEqual([{selectedModel: "Civic"}]); }); }); diff --git a/src/layouts/vehicle-model/model-question/model-question.vue b/src/layouts/vehicle-model/model-question/model-question.vue index a78684b12..68d23bc16 100644 --- a/src/layouts/vehicle-model/model-question/model-question.vue +++ b/src/layouts/vehicle-model/model-question/model-question.vue @@ -3,7 +3,7 @@ :questionText="questionText" :answers="models" groupName="Choose Vehicle Model" - v-model="selectedModel" + v-model="modelValue" /> @@ -19,7 +19,6 @@ export default { data() { return { questionText: null, - selectedModel: null, models: Array, } }, @@ -39,7 +38,7 @@ export default { } }, watch: { - selectedModel(val) { + modelValue(val) { this.$emit("update:modelValue", val); } }, diff --git a/src/layouts/vehicle-style/style-question/style-question.spec.js b/src/layouts/vehicle-style/style-question/style-question.spec.js index f03ce5e96..d346e3e62 100644 --- a/src/layouts/vehicle-style/style-question/style-question.spec.js +++ b/src/layouts/vehicle-style/style-question/style-question.spec.js @@ -12,11 +12,11 @@ describe("style-question.vue", () => { const styleToSelect = "4 Door"; //Act - wrapper.setData({ selectedStyle: styleToSelect }); + wrapper.setValue({ selectedStyle: styleToSelect }); await wrapper.vm.$nextTick(); //Assert - expect(wrapper.emitted()["update:modelValue"][0]).toEqual(["4 Door"]); + expect(wrapper.emitted()["update:modelValue"][0]).toEqual([{selectedStyle: "4 Door"}]); }); }); diff --git a/src/layouts/vehicle-style/style-question/style-question.vue b/src/layouts/vehicle-style/style-question/style-question.vue index 6d1e1cd46..a9bbd9fbf 100644 --- a/src/layouts/vehicle-style/style-question/style-question.vue +++ b/src/layouts/vehicle-style/style-question/style-question.vue @@ -3,7 +3,7 @@ :questionText="questionText" :answers="styles" groupName="Choose Vehicle Style" - v-model="selectedStyle" + v-model="modelValue" /> @@ -19,7 +19,6 @@ export default { data() { return { questionText: null, - selectedStyle: null, styles: Array, } }, @@ -39,7 +38,7 @@ export default { } }, watch: { - selectedStyle(val) { + modelValue(val) { this.$emit("update:modelValue", val); } }, diff --git a/src/layouts/vehicle-year/year-question/year-question.spec.js b/src/layouts/vehicle-year/year-question/year-question.spec.js index 3c00dcd9d..4d1a32a34 100644 --- a/src/layouts/vehicle-year/year-question/year-question.spec.js +++ b/src/layouts/vehicle-year/year-question/year-question.spec.js @@ -12,11 +12,11 @@ describe("year-question.vue", () => { const yearToSelect = "2021"; //Act - wrapper.setData({ selectedYear: yearToSelect }); + wrapper.setValue({ modelValue: yearToSelect }); await wrapper.vm.$nextTick(); //Assert - expect(wrapper.emitted()["update:modelValue"][0]).toEqual(["2021"]); + expect(wrapper.emitted()["update:modelValue"][0]).toEqual([{modelValue: "2021"}]); }); }); diff --git a/src/layouts/vehicle-year/year-question/year-question.vue b/src/layouts/vehicle-year/year-question/year-question.vue index 1a4a80279..6399abb0c 100644 --- a/src/layouts/vehicle-year/year-question/year-question.vue +++ b/src/layouts/vehicle-year/year-question/year-question.vue @@ -3,7 +3,7 @@ :questionText="questionText" :answers="years" groupName="Choose Vehicle Year" - v-model="selectedYear" + v-model="modelValue" /> @@ -18,7 +18,6 @@ export default { data() { return { questionText: null, - selectedYear: null, years: Array, } }, @@ -38,7 +37,7 @@ export default { } }, watch: { - selectedYear(val) { + modelValue(val) { this.$emit("update:modelValue", val); } },