Fixing test
This commit is contained in:
parent
9a2224cc11
commit
f9aa447f6b
2 changed files with 5 additions and 15 deletions
|
|
@ -774,8 +774,7 @@ describe('coverageStatement.vue-working', () => {
|
|||
order: {
|
||||
payment: {
|
||||
insuranceCoverage: {
|
||||
claimNumber: null,
|
||||
isVerified: true // Added
|
||||
claimNumber: null
|
||||
}
|
||||
},
|
||||
policy: {
|
||||
|
|
@ -854,19 +853,6 @@ describe('coverageStatement.vue-working', () => {
|
|||
// Assert
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
test('returns false when no comp', () => {
|
||||
// Arrange
|
||||
const mainInitialState = shouldRegisterClaimStoreStateItac;
|
||||
mainInitialState.order.policy.noCoverage = true;
|
||||
const { wrapper } = getMountedComponent(mainInitialState);
|
||||
|
||||
// Act
|
||||
const result = wrapper.vm.shouldRegisterClaim;
|
||||
|
||||
// Assert
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
test('returns false when insuranceCoverage not verified', () => {});
|
||||
describe('returns true when policy lookup success, vehicleId set to %p, claim reg req, claim not yet reg', () => {
|
||||
test('and itac', () => {
|
||||
// Arrange
|
||||
|
|
|
|||
|
|
@ -289,15 +289,19 @@ export const useMainStore = defineStore({
|
|||
const { policyLookupSuccessful } = policy;
|
||||
const registerClaimSuccessful = !!payment.insuranceCoverage.isVerified;
|
||||
if (!policyLookupSuccessful) {
|
||||
console.log('policy fail');
|
||||
return true;
|
||||
}
|
||||
if (s.isNoComp && !s.issConfig.enableNoCompQuote) {
|
||||
console.log('no comp not enabled');
|
||||
return true;
|
||||
}
|
||||
if (!s.isNoComp && currentDeductible == null) {
|
||||
console.log('null deductible');
|
||||
return true;
|
||||
}
|
||||
if (s.isClaimRegistrationRequired && !registerClaimSuccessful) {
|
||||
console.log('claim reg required but failed');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue