add unit test
This commit is contained in:
parent
bd9022177c
commit
aa786e8f7a
1 changed files with 32 additions and 1 deletions
|
|
@ -367,6 +367,37 @@ describe.skip('coverageStatement.vue', () => {
|
|||
]
|
||||
});
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.verifiedDeductible).toBeFalsy();
|
||||
});
|
||||
test('If deductible is null, verifiedDeductible returns false', () => {
|
||||
const sellingPrice = getRandomInt(100, 500);
|
||||
const deductible = null;
|
||||
const mainInitialState = {
|
||||
order: {
|
||||
damage: {
|
||||
isRepair: true
|
||||
},
|
||||
policy: {
|
||||
noCoverage: false,
|
||||
deductible: {
|
||||
repair: deductible
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const { wrapper } = getMountedComponent(mainInitialState);
|
||||
wrapper.setData({
|
||||
availableLineItems: [
|
||||
{
|
||||
sellingPrice,
|
||||
kitPrice: 0,
|
||||
laborAmount: 0
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.verifiedDeductible).toBeFalsy();
|
||||
});
|
||||
|
|
@ -747,7 +778,7 @@ describe.skip('coverageStatement.vue', () => {
|
|||
expect(wrapper.vm.mainStore.registerClaim).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.only('claim registration required => register claim method called', async () => {
|
||||
it('claim registration required => register claim method called', async () => {
|
||||
// Arrange
|
||||
const sellingPrice = getRandomInt(50, 100);
|
||||
const deductible = sellingPrice - 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue