SSR-512 PR Changes
This commit is contained in:
parent
bee74cdab2
commit
3dc288ae5c
2 changed files with 32 additions and 24 deletions
|
|
@ -824,6 +824,30 @@ describe.skip('coverageStatement.vue', () => {
|
|||
// Assert
|
||||
expect(wrapper.vm.mainStore.registerClaim).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('coverageStatement.vue-working', () => {
|
||||
describe('ITAC flag', () => {
|
||||
test('ITAC flag updated once component is initialized', () => {
|
||||
// Arrange
|
||||
const mainInitialState = {
|
||||
order: {
|
||||
policy: {
|
||||
isITAC: null
|
||||
}
|
||||
}
|
||||
};
|
||||
const { wrapper } = getMountedComponent(mainInitialState);
|
||||
|
||||
// Act
|
||||
wrapper.vm.initializeComponent();
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.mainStore.updatePolicyITACFlag)
|
||||
.toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('Loaded duplicate with previously registered claim => claim registration is not called', async () => {
|
||||
// Arrange
|
||||
const sellingPrice = getRandomInt(50, 100);
|
||||
|
|
@ -838,7 +862,7 @@ describe.skip('coverageStatement.vue', () => {
|
|||
}
|
||||
},
|
||||
damage: {
|
||||
isRepair: true
|
||||
isRepair: false
|
||||
},
|
||||
payment: {
|
||||
insuranceCoverage: {
|
||||
|
|
@ -877,26 +901,3 @@ describe.skip('coverageStatement.vue', () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('coverageStatement.vue-working', () => {
|
||||
describe('ITAC flag', () => {
|
||||
test('ITAC flag updated once component is initialized', () => {
|
||||
// Arrange
|
||||
const mainInitialState = {
|
||||
order: {
|
||||
policy: {
|
||||
isITAC: null
|
||||
}
|
||||
}
|
||||
};
|
||||
const { wrapper } = getMountedComponent(mainInitialState);
|
||||
|
||||
// Act
|
||||
wrapper.vm.initializeComponent();
|
||||
|
||||
// Assert
|
||||
expect(wrapper.vm.mainStore.updatePolicyITACFlag)
|
||||
.toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1394,6 +1394,12 @@ export const useMainStore = defineStore({
|
|||
});
|
||||
},
|
||||
|
||||
resetInsurance() {
|
||||
this.order.payment.insuranceCoverage.coverageStatus = coverageStatuses.PENDING;
|
||||
this.order.payment.insuranceCoverage.claimNumber = null;
|
||||
this.order.payment.insuranceCoverage.isVerified = false;
|
||||
},
|
||||
|
||||
updateSupportingItems(partsData) {
|
||||
this.order.lineItems.supportingItems = partsData;
|
||||
},
|
||||
|
|
@ -2110,6 +2116,7 @@ export const useMainStore = defineStore({
|
|||
this.order.loadedSessionClearedPreviousData = null;
|
||||
this.resetVehicleState();
|
||||
this.resetDamageState();
|
||||
this.resetInsurance();
|
||||
this.resetBailout();
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue