SSR-661 Fix vin-lookup unit tests from method move

This commit is contained in:
Josh Dassinger 2023-09-22 13:09:41 -05:00
parent 98d54e20fd
commit 2e390577bd

View file

@ -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);