From db8be5e8c9dc1d68c38eb8605216803928522d3a Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 31 Jan 2022 16:21:02 -0500 Subject: [PATCH] Conflict fixes and update to logic for taking in multiple modelvalue items --- .../button-question/button-question.spec.js | 15 +----- .../button-question/button-question.vue | 21 +++----- src/layouts/vehicle-damage/vehicle-damage.vue | 2 +- .../list-button-horizontal.vue | 48 +++++++++++++++--- src/ux-components/list-button/list-button.vue | 49 +++++++++++++++---- src/ux-components/list-card/list-card.vue | 40 ++++++++++++--- 6 files changed, 122 insertions(+), 53 deletions(-) diff --git a/src/common-components/button-question/button-question.spec.js b/src/common-components/button-question/button-question.spec.js index 808e5c4ba..e59b6da39 100644 --- a/src/common-components/button-question/button-question.spec.js +++ b/src/common-components/button-question/button-question.spec.js @@ -62,20 +62,7 @@ describe("buttonQuestion.vue", () => { }); describe("buttonQuestion.vue", () => { - it("Should trigger event modelValue change with one string value on select if checked is true and only one option is selected", async () => { - // Act - const wrapper = shallowMount(buttonQuestion); - await wrapper.setData({ - chosenAnswer: "Windshield" - }); - wrapper.vm.isItemChecked(true); - // Assert - expect(wrapper.emitted()["update:modelValue"][0]).toEqual(["Windshield"]); - }); -}); - -describe("buttonQuestion.vue", () => { - it("Should trigger event modelValue change with an array of string values on select if checked is true and multiple optiopns are chosen", async () => { + it("Should trigger event modelValue change with an array of string values on select if checked is true and multiple options are chosen", async () => { // Act const wrapper = shallowMount(buttonQuestion); await wrapper.setData({ diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue index 28fd2258f..857e3e621 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/common-components/button-question/button-question.vue @@ -7,7 +7,10 @@
{{groupName}}
- -
+
-
- -