From 2e390577bd0db7fe9a0166d41b67b492cd5ed18d Mon Sep 17 00:00:00 2001 From: Josh Dassinger Date: Fri, 22 Sep 2023 13:09:41 -0500 Subject: [PATCH] SSR-661 Fix vin-lookup unit tests from method move --- src/layouts/vin-lookup/vin-lookup.spec.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/layouts/vin-lookup/vin-lookup.spec.js b/src/layouts/vin-lookup/vin-lookup.spec.js index d38cd24c..d28d172e 100644 --- a/src/layouts/vin-lookup/vin-lookup.spec.js +++ b/src/layouts/vin-lookup/vin-lookup.spec.js @@ -12,6 +12,7 @@ import navigationScenarios from '@/router/router-constants/navigation-scenarios' import routerParams from '@/router/router-constants/router-params'; import { useMainStore } from '@/store'; import VinLookupComponent from '@/layouts/vin-lookup/vin-lookup.vue'; +import vehicleQuestionsMixin from '@/mixins/vehicle-questions-mixin'; const continueButtonQuerySelector = '[data-test-id="site-footer-main-button"]'; const errorMessageWrapperElSelector = '#vin-question-wrapper .form-test-error'; @@ -287,7 +288,7 @@ describe('vin-lookup.vue', () => { jest.spyOn(VinLookupComponent.methods, lookupVehicleByVin.methodName) .mockResolvedValue(lookupVehicleByVin.mockResponse); - jest.spyOn(VinLookupComponent.methods, getPartsOrQuestions.methodName) + jest.spyOn(vehicleQuestionsMixin.methods, getPartsOrQuestions.methodName) .mockResolvedValue(getPartsOrQuestions.mockResponse); mountOptions.data = () => ({ @@ -323,7 +324,7 @@ describe('vin-lookup.vue', () => { getPartsOrQuestions.mockResponse = vehicleWithPartQuestionsMockResponse; jest.spyOn(VinLookupComponent.methods, lookupVehicleByVin.methodName) .mockResolvedValue(lookupVehicleByVin.mockResponse); - jest.spyOn(VinLookupComponent.methods, getPartsOrQuestions.methodName) + jest.spyOn(vehicleQuestionsMixin.methods, getPartsOrQuestions.methodName) .mockResolvedValue(getPartsOrQuestions.mockResponse); const { container } = render(VinLookupComponent, mountOptions); @@ -355,7 +356,7 @@ describe('vin-lookup.vue', () => { getPartsOrQuestions.mockResponse = vehicleWithMultiplePartsMockResponse; jest.spyOn(VinLookupComponent.methods, lookupVehicleByVin.methodName) .mockResolvedValue(lookupVehicleByVin.mockResponse); - jest.spyOn(VinLookupComponent.methods, getPartsOrQuestions.methodName) + jest.spyOn(vehicleQuestionsMixin.methods, getPartsOrQuestions.methodName) .mockResolvedValue(getPartsOrQuestions.mockResponse); const { container } = render(VinLookupComponent, mountOptions); @@ -387,7 +388,7 @@ describe('vin-lookup.vue', () => { getPartsOrQuestions.mockResponse = vehicleWithMoldingQuestionsMockResponse; jest.spyOn(VinLookupComponent.methods, lookupVehicleByVin.methodName) .mockResolvedValue(lookupVehicleByVin.mockResponse); - jest.spyOn(VinLookupComponent.methods, getPartsOrQuestions.methodName) + jest.spyOn(vehicleQuestionsMixin.methods, getPartsOrQuestions.methodName) .mockResolvedValue(getPartsOrQuestions.mockResponse); const { container } = render(VinLookupComponent, mountOptions); @@ -421,7 +422,7 @@ describe('vin-lookup.vue', () => { jest.spyOn(VinLookupComponent.methods, lookupVehicleByVin.methodName) .mockResolvedValue(lookupVehicleByVin.mockResponse); - jest.spyOn(VinLookupComponent.methods, getPartsOrQuestions.methodName) + jest.spyOn(vehicleQuestionsMixin.methods, getPartsOrQuestions.methodName) .mockResolvedValue(getPartsOrQuestions.mockResponse); store.getCapabilityQuestions.mockResolvedValueOnce({ data: [] }); @@ -455,7 +456,7 @@ describe('vin-lookup.vue', () => { jest.spyOn(VinLookupComponent.methods, lookupVehicleByVin.methodName) .mockResolvedValue(lookupVehicleByVin.mockResponse); - jest.spyOn(VinLookupComponent.methods, getPartsOrQuestions.methodName) + jest.spyOn(vehicleQuestionsMixin.methods, getPartsOrQuestions.methodName) .mockResolvedValue(getPartsOrQuestions.mockResponse); const { container } = render(VinLookupComponent, mountOptions);