unit test fix
This commit is contained in:
parent
768952e030
commit
1a8a26cdb7
1 changed files with 9 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ import { useMainStore } from '@/store';
|
|||
import { getPriceOfLineItems } from '@/helpers/price-calculator.js';
|
||||
import coverageStatuses from '@/constants/coverage-statuses';
|
||||
import coverageType from '@/constants/coverage-type';
|
||||
import { containsRecalParts } from '@/helpers/recal-helper';
|
||||
|
||||
jest.mock('@/helpers/layout-helper.js', () => jest.fn());
|
||||
jest.mock('@/helpers/price-calculator.js', () => ({
|
||||
|
|
@ -32,6 +33,10 @@ jest.mock('@/helpers/text-helper', () => ({
|
|||
formatAmountInDollars: jest.fn()
|
||||
}));
|
||||
|
||||
jest.mock('@/helpers/recal-helper.js', () => ({
|
||||
containsRecalParts: jest.fn()
|
||||
}));
|
||||
|
||||
const SAFELITE_PROVIDER = 'Safelite';
|
||||
const CANCEL_CLAIM_REF_NAME = 'CancelClaimModal';
|
||||
|
||||
|
|
@ -337,15 +342,17 @@ describe('coverageStatement.vue', () => {
|
|||
// Assert
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
test('returns true when a part in glassParts require recalibration', () => {
|
||||
test('returns true when a part in glassParts require recalibration and recalibration has been added to order', () => {
|
||||
// Arrange
|
||||
containsRecalParts.mockReturnValue(true);
|
||||
const mainInitialState = {
|
||||
order: {
|
||||
lineItems: {
|
||||
glassParts: [
|
||||
{
|
||||
partNumber: 123,
|
||||
requiresRecalibration: true
|
||||
requiresRecalibration: true,
|
||||
partType: 'RECALIBRATION'
|
||||
},
|
||||
{
|
||||
partNumber: 111,
|
||||
|
|
|
|||
Loading…
Reference in a new issue