INSR-523: Update shouldRegisterClaim unit tests
This commit is contained in:
parent
7a7d064f0d
commit
ec67c21b40
1 changed files with 13 additions and 9 deletions
|
|
@ -406,23 +406,26 @@ describe('coverageStatement.vue', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe.each([
|
describe.each([
|
||||||
[false, false, true, true, 0],
|
[false, false, true, true, 0, false],
|
||||||
[false, true, false, true, 0],
|
[false, true, false, true, 0, false],
|
||||||
[false, true, true, false, 0],
|
[false, true, true, false, 0, false],
|
||||||
[false, true, true, true, -1],
|
[false, true, true, true, -1, false],
|
||||||
[false, true, true, true, null],
|
[false, true, true, true, null, false],
|
||||||
[true, true, true, true, 0]
|
[false, true, true, true, 0, true],
|
||||||
|
[true, true, true, true, 0, false]
|
||||||
])('shouldRegisterClaim', (
|
])('shouldRegisterClaim', (
|
||||||
expected,
|
expected,
|
||||||
isClaimRegistrationRequired,
|
isClaimRegistrationRequired,
|
||||||
isPolicyLookupSuccessful,
|
isPolicyLookupSuccessful,
|
||||||
isPendingClaimRegistration,
|
isPendingClaimRegistration,
|
||||||
policyVehicleId
|
policyVehicleId,
|
||||||
|
callClaimRegistrationAtEnd
|
||||||
) => {
|
) => {
|
||||||
test(`returns ${expected} when isClaimRegistrationRequired is ${isClaimRegistrationRequired} `
|
test(`returns ${expected} when isClaimRegistrationRequired is ${isClaimRegistrationRequired} `
|
||||||
+ `and isPolicyLookupSuccessful is ${isPolicyLookupSuccessful} `
|
+ `and isPolicyLookupSuccessful is ${isPolicyLookupSuccessful} `
|
||||||
+ `and isPendingClaimRegistration is ${isPendingClaimRegistration} `
|
+ `and isPendingClaimRegistration is ${isPendingClaimRegistration} `
|
||||||
+ `and policyVehicleId is ${(policyVehicleId == null ? 'NULL' : policyVehicleId)}`, () => {
|
+ `and policyVehicleId is ${(policyVehicleId == null ? 'NULL' : policyVehicleId)}`
|
||||||
|
+ `and callClaimRegistrationAtEnd is ${callClaimRegistrationAtEnd}`, () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const mainInitialState = {
|
const mainInitialState = {
|
||||||
order: {
|
order: {
|
||||||
|
|
@ -435,7 +438,8 @@ describe('coverageStatement.vue', () => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
issConfig: {
|
issConfig: {
|
||||||
isClaimRegistrationRequired
|
isClaimRegistrationRequired,
|
||||||
|
callClaimRegistrationAtEnd
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue