SSR-1373 Fix unit tests
This commit is contained in:
parent
0d944f155d
commit
453b8e630a
1 changed files with 3 additions and 16 deletions
|
|
@ -28,8 +28,6 @@ function setupMocks({
|
||||||
isZipServiceable = true,
|
isZipServiceable = true,
|
||||||
lookupVinByPlateResponse,
|
lookupVinByPlateResponse,
|
||||||
partsOrQuestions = [],
|
partsOrQuestions = [],
|
||||||
vehicle = {},
|
|
||||||
vin = null,
|
|
||||||
carId = 'C0000',
|
carId = 'C0000',
|
||||||
vinLookupResponseError = null,
|
vinLookupResponseError = null,
|
||||||
route = null
|
route = null
|
||||||
|
|
@ -47,7 +45,8 @@ function setupMocks({
|
||||||
vehicle: {
|
vehicle: {
|
||||||
carId: 'CARID'
|
carId: 'CARID'
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
error: vinLookupResponseError
|
||||||
}));
|
}));
|
||||||
|
|
||||||
useMainStore().getPartsOrQuestions = jest.fn().mockImplementation(() => Promise.resolve({
|
useMainStore().getPartsOrQuestions = jest.fn().mockImplementation(() => Promise.resolve({
|
||||||
|
|
@ -78,19 +77,7 @@ function setupMocks({
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const apiResponses = {
|
settleAllPromises.mockImplementation(() => Promise.resolve({}));
|
||||||
serviceZipValidationResponse: {
|
|
||||||
isValid: isZipValid,
|
|
||||||
isServiceable: isZipServiceable
|
|
||||||
},
|
|
||||||
vinLookupResponse: {
|
|
||||||
vin,
|
|
||||||
vehicle,
|
|
||||||
error: vinLookupResponseError
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
settleAllPromises.mockImplementation(() => apiResponses);
|
|
||||||
|
|
||||||
wrapper.vm.getCmsContent = jest.fn().mockImplementation(() => '');
|
wrapper.vm.getCmsContent = jest.fn().mockImplementation(() => '');
|
||||||
wrapper.vm.setCmsContent = jest.fn();
|
wrapper.vm.setCmsContent = jest.fn();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue