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, {
|
||||
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");
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
|
|
|||
|
|
@ -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" }]);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue