Updating unit tests.
This commit is contained in:
parent
a472919eef
commit
5bdcbe91b2
2 changed files with 56 additions and 3 deletions
|
|
@ -547,10 +547,11 @@ export const useMainStore = defineStore({
|
||||||
currentDeductible: this.order.currentDeductible,
|
currentDeductible: this.order.currentDeductible,
|
||||||
noCoverage: this.order.policy.noCoverage,
|
noCoverage: this.order.policy.noCoverage,
|
||||||
isRepair: this.order.damage.isRepair,
|
isRepair: this.order.damage.isRepair,
|
||||||
|
policyNumber: this.order.policy.policyNumber,
|
||||||
insuredFirstName: this.order.customer.firstName,
|
insuredFirstName: this.order.customer.firstName,
|
||||||
insuredLastName: this.order.customer.lastName,
|
insuredLastName: this.order.customer.lastName,
|
||||||
insuredZipCode: this.order.customer.address.zipCode,
|
insuredZipCode: this.order.customer.address.zipCode,
|
||||||
policyVehicleId: this.order.vehicle.policyVehicleId,
|
policyVehicleId: this.order.vehicle.policyVehicleId?.toString() ?? '',
|
||||||
vehicleVin: this.order.vehicle.vin,
|
vehicleVin: this.order.vehicle.vin,
|
||||||
policyData: this.order.policy.policyData,
|
policyData: this.order.policy.policyData,
|
||||||
isItac: this.order.policy.isITAC
|
isItac: this.order.policy.isITAC
|
||||||
|
|
|
||||||
|
|
@ -1740,6 +1740,15 @@ describe('Store', () => {
|
||||||
const currentDeductible = getRandomInt(0, 5000);
|
const currentDeductible = getRandomInt(0, 5000);
|
||||||
const noCoverage = getRandomBoolean();
|
const noCoverage = getRandomBoolean();
|
||||||
const isRepair = getRandomBoolean();
|
const isRepair = getRandomBoolean();
|
||||||
|
const policyNumber = getRandomString(10, 20);
|
||||||
|
const insuredFirstName = getRandomString(10, 20);
|
||||||
|
const insuredLastName = getRandomString(10, 20);
|
||||||
|
const insuredZipCode = getRandomInt(5, 5);
|
||||||
|
const policyVehicleId = getRandomInt(1, 2);
|
||||||
|
const vehicleVin = getRandomInt(17, 17);
|
||||||
|
const policyData = getRandomString(100, 200);
|
||||||
|
const isItac = getRandomBoolean();
|
||||||
|
|
||||||
store.order.referralCorrelationId = referralCorrelationId;
|
store.order.referralCorrelationId = referralCorrelationId;
|
||||||
store.issConfig.parentAccountNumber = accountNumber;
|
store.issConfig.parentAccountNumber = accountNumber;
|
||||||
store.order.currentDeductible = currentDeductible;
|
store.order.currentDeductible = currentDeductible;
|
||||||
|
|
@ -1747,6 +1756,15 @@ describe('Store', () => {
|
||||||
store.order.policy.status = status;
|
store.order.policy.status = status;
|
||||||
store.order.customer.address.state = policyState;
|
store.order.customer.address.state = policyState;
|
||||||
store.order.damage.isRepair = isRepair;
|
store.order.damage.isRepair = isRepair;
|
||||||
|
store.order.policy.policyNumber = policyNumber;
|
||||||
|
store.order.insured.firstName = insuredFirstName;
|
||||||
|
store.order.insured.lastName = insuredLastName;
|
||||||
|
store.order.insured.address.zipCode = insuredZipCode;
|
||||||
|
store.order.vehicle.policyVehicleId = policyVehicleId;
|
||||||
|
store.order.vehicle.vin = vehicleVin;
|
||||||
|
store.order.policy.policyData = policyData;
|
||||||
|
store.order.policy.isItac = isItac;
|
||||||
|
|
||||||
globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve({}));
|
globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve({}));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
@ -1765,7 +1783,15 @@ describe('Store', () => {
|
||||||
status,
|
status,
|
||||||
currentDeductible,
|
currentDeductible,
|
||||||
noCoverage,
|
noCoverage,
|
||||||
isRepair
|
isRepair,
|
||||||
|
policyNumber,
|
||||||
|
insuredFirstName,
|
||||||
|
insuredLastName,
|
||||||
|
insuredZipCode,
|
||||||
|
policyVehicleId,
|
||||||
|
vehicleVin,
|
||||||
|
policyData,
|
||||||
|
isItac
|
||||||
})
|
})
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
@ -1805,6 +1831,15 @@ describe('Store', () => {
|
||||||
selectedAnswer: 'No'
|
selectedAnswer: 'No'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
const policyNumber = getRandomString(10, 20);
|
||||||
|
const insuredFirstName = getRandomString(10, 20);
|
||||||
|
const insuredLastName = getRandomString(10, 20);
|
||||||
|
const insuredZipCode = getRandomInt(5, 5);
|
||||||
|
const policyVehicleId = getRandomInt(1, 2);
|
||||||
|
const vehicleVin = getRandomInt(17, 17);
|
||||||
|
const policyData = getRandomString(100, 200);
|
||||||
|
const isItac = getRandomBoolean();
|
||||||
|
|
||||||
store.order.referralCorrelationId = referralCorrelationId;
|
store.order.referralCorrelationId = referralCorrelationId;
|
||||||
store.issConfig.parentAccountNumber = accountNumber;
|
store.issConfig.parentAccountNumber = accountNumber;
|
||||||
store.order.currentDeductible = currentDeductible;
|
store.order.currentDeductible = currentDeductible;
|
||||||
|
|
@ -1813,6 +1848,15 @@ describe('Store', () => {
|
||||||
store.order.customer.address.state = policyState;
|
store.order.customer.address.state = policyState;
|
||||||
store.order.policy.endorsementQuestionAnswers = endorsementAnswers;
|
store.order.policy.endorsementQuestionAnswers = endorsementAnswers;
|
||||||
store.order.damage.isRepair = isRepair;
|
store.order.damage.isRepair = isRepair;
|
||||||
|
store.order.policy.policyNumber = policyNumber;
|
||||||
|
store.order.insured.firstName = insuredFirstName;
|
||||||
|
store.order.insured.lastName = insuredLastName;
|
||||||
|
store.order.insured.address.zipCode = insuredZipCode;
|
||||||
|
store.order.vehicle.policyVehicleId = policyVehicleId;
|
||||||
|
store.order.vehicle.vin = vehicleVin;
|
||||||
|
store.order.policy.policyData = policyData;
|
||||||
|
store.order.policy.isItac = isItac;
|
||||||
|
|
||||||
globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve({}));
|
globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve({}));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
@ -1832,7 +1876,15 @@ describe('Store', () => {
|
||||||
status,
|
status,
|
||||||
currentDeductible,
|
currentDeductible,
|
||||||
noCoverage,
|
noCoverage,
|
||||||
isRepair
|
isRepair,
|
||||||
|
policyNumber,
|
||||||
|
insuredFirstName,
|
||||||
|
insuredLastName,
|
||||||
|
insuredZipCode,
|
||||||
|
policyVehicleId,
|
||||||
|
vehicleVin,
|
||||||
|
policyData,
|
||||||
|
isItac
|
||||||
})
|
})
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue