From c2fa0784a7d8b117d8520a9c055a2d1a9f015f2c Mon Sep 17 00:00:00 2001 From: Katie Date: Tue, 4 Oct 2022 08:51:41 -0400 Subject: [PATCH] CSR-762 Fix tests --- .../address-vehicles-question.spec.js | 6 +++--- .../windshield-chip-count-question.spec.js | 2 +- .../windshield-damage-type-question.spec.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.spec.js b/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.spec.js index 70f056e3b..16451b219 100644 --- a/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.spec.js +++ b/src/layouts/address-vehicles/address-vehicles-question/address-vehicles-question.spec.js @@ -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"); diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.spec.js b/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.spec.js index 635f389f1..795606526 100644 --- a/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.spec.js +++ b/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.spec.js @@ -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]); diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.spec.js b/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.spec.js index 2e3b5aa3c..4b247d705 100644 --- a/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.spec.js +++ b/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.spec.js @@ -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" }]); }); });