CSR-762 Fix tests
This commit is contained in:
parent
187b02e512
commit
c2fa0784a7
3 changed files with 5 additions and 5 deletions
|
|
@ -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");
|
||||||
|
|
|
||||||
|
|
@ -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]);
|
||||||
|
|
|
||||||
|
|
@ -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" }]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue