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

View file

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

View file

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

View file

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

View file

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