CSR-762 Fix merge conflicts

This commit is contained in:
Katie 2022-10-04 14:45:37 -04:00
commit 2e35d59c89
5 changed files with 13 additions and 9 deletions

View file

@ -13,7 +13,7 @@
:value="value" :value="value"
:checked="isChecked" :checked="isChecked"
@keypress.space="handleEventAction('space', $event)" @keypress.space="handleEventAction('space', $event)"
@keypress.enter="handleEventAction('keypressSubmit', $event)" @keypress.enter="handleEventAction('enter', $event)"
@change="handleEventAction('change', $event)" /> @change="handleEventAction('change', $event)" />
<slot></slot> <slot></slot>
@ -74,13 +74,14 @@ export default {
handleEventAction(eventType, e) { handleEventAction(eventType, e) {
const eventTypes = { const eventTypes = {
CHANGE: "change", CHANGE: "change",
KEYPRESS_SUBMIT: "keypressSubmit", ENTER: "enter",
SPACE: "space",
CLICK: "click", CLICK: "click",
}; };
if (this.isMultiSelect) { if (this.isMultiSelect) {
switch (eventType) { switch (eventType) {
case eventTypes.KEYPRESS_SUBMIT: case eventTypes.ENTER:
case eventTypes.CHANGE: case eventTypes.CHANGE:
this.handleClick(e); this.handleClick(e);
// this.dispatchStoreAction( // this.dispatchStoreAction(
@ -95,7 +96,8 @@ export default {
} else { } else {
switch (eventType) { switch (eventType) {
case eventTypes.CLICK: case eventTypes.CLICK:
case eventTypes.KEYPRESS_SUBMIT: case eventTypes.ENTER:
case eventTypes.SPACE:
this.handleClick(e); this.handleClick(e);
// this.pushClickEventToGAIfReady(); // this.pushClickEventToGAIfReady();
break; break;

View file

@ -13,6 +13,7 @@
</div> </div>
<div class="w-100 d-flex justify-content-center"> <div class="w-100 d-flex justify-content-center">
<fieldset <fieldset
class="w-100" class="w-100"
:aria-required="isRequired" :aria-required="isRequired"
@ -24,6 +25,7 @@
<legend <legend
class="sr-only" class="sr-only"
:data-focus-target="formatString(groupName)" :data-focus-target="formatString(groupName)"
tabindex="-1"
:id="formatString(groupName)"> :id="formatString(groupName)">
{{ questionText }} {{ questionText }}
{{ {{

View file

@ -34,14 +34,14 @@ describe("addressVehiclesQuestion.vue", () => {
const wrapper = shallowMount(addressVehiclesQuestion, { const wrapper = shallowMount(addressVehiclesQuestion, {
mixins: [mockMixin], mixins: [mockMixin],
propsData: { propsData: {
vehicles: ["1", "2"], vehicles: ["1", "2", "newValue"],
modelValue: ["1", "2"], modelValue: "2",
} }
}); });
// Act // Act
const localThis = { $emit: jest.fn() } const localThis = { $emit: jest.fn() }
addressVehiclesQuestion.computed.selectedVehicleVinAsArray.set.call(localThis, ['newValue']); addressVehiclesQuestion.computed.selectedVehicleVin.set.call(localThis, 'newValue');
// Assert // Assert
expect(localThis.$emit).toBeCalledWith("update:modelValue", "newValue"); expect(localThis.$emit).toBeCalledWith("update:modelValue", "newValue");

View file

@ -17,7 +17,7 @@ describe("windshield-chip-count-question.vue", () => {
const { wrapper } = setupMocks({ modelValueProp: 1 }); const { wrapper } = setupMocks({ modelValueProp: 1 });
//Act //Act
await wrapper.setData({ numberOfChips: 2 }); wrapper.vm.selectedValue = "2";
//Assert //Assert
expect(wrapper.emitted()["update:modelValue"][0]).toEqual([2]); expect(wrapper.emitted()["update:modelValue"][0]).toEqual([2]);

View file

@ -15,7 +15,7 @@ describe("windshield-damage-type-question.vue", () => {
await wrapper.vm.$nextTick(); await wrapper.vm.$nextTick();
//Assert //Assert
expect(wrapper.vm.selectedWindshieldDamageType).toEqual("Repair"); expect(wrapper.vm.selectedValues).toEqual("Repair");
expect(wrapper.emitted()["update:modelValue"][0]).toEqual([{ modelValue: "Replace" }]); expect(wrapper.emitted()["update:modelValue"][0]).toEqual([{ modelValue: "Replace" }]);
}); });
}); });