Fixing bugs
This commit is contained in:
parent
5cfb0581a2
commit
413bf762bb
3 changed files with 32 additions and 28 deletions
|
|
@ -4,14 +4,11 @@ exports[`coverageStatement.vue-working returns the initial data 1`] = `
|
|||
Object {
|
||||
"baseServiceLineItems": Array [],
|
||||
"deductibleText": "Your deductible is",
|
||||
"isNoComp": false,
|
||||
"isRepair": true,
|
||||
"loadingText": Array [
|
||||
"Connecting to your insurance company",
|
||||
"Nearly there",
|
||||
"Finishing up",
|
||||
],
|
||||
"policyLookupSuccessful": true,
|
||||
"rules": Object {
|
||||
"selectionRequired": "option-required",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ describe('coverageStatement.vue-working', () => {
|
|||
isRepair: true
|
||||
},
|
||||
policy: {
|
||||
policyLookupSuccessful: true,
|
||||
noCoverage: false
|
||||
noCoverage: false,
|
||||
policyLookupSuccessful: true
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1237,11 +1237,15 @@ describe('coverageStatement.vue-working', () => {
|
|||
const initialStore = {
|
||||
order: {
|
||||
payment: {
|
||||
insuranceCoverage: { claimNumber: null }
|
||||
insuranceCoverage: {
|
||||
claimNumber: null,
|
||||
isVerified: true
|
||||
}
|
||||
},
|
||||
policy: {
|
||||
policyLookupSuccessful: true,
|
||||
noCoverage: false
|
||||
noCoverage: false,
|
||||
isITAC: false,
|
||||
policyLookupSuccessful: true
|
||||
},
|
||||
vehicle: {
|
||||
policyVehicleId: 1
|
||||
|
|
@ -1262,6 +1266,8 @@ describe('coverageStatement.vue-working', () => {
|
|||
const { wrapper } = getMountedComponent(initialStore, {}, mockStoreActions);
|
||||
const next = (method) => { method(wrapper.vm); };
|
||||
|
||||
console.log(wrapper.vm.pageVariation);
|
||||
|
||||
// Act
|
||||
coverageStatement.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next);
|
||||
for (let i = 0; i < 7; i++) {
|
||||
|
|
|
|||
|
|
@ -56,25 +56,7 @@ describe('payment-method.vue', () => {
|
|||
describe('Payment Method Type', () => {
|
||||
test('getting payment method when method is pay later', async () => {
|
||||
// Arrange
|
||||
const payLaterPaymentMethod = paymentMethods.PAY_AT_TIME_OF_SERVICE;
|
||||
const store = {
|
||||
order: {
|
||||
payment: {
|
||||
isPayInAdvance: true,
|
||||
payInAdvanceType: payLaterPaymentMethod
|
||||
}
|
||||
}
|
||||
};
|
||||
const wrapper = setupMocks({}, store);
|
||||
|
||||
// Act
|
||||
const paymethod = wrapper.vm.getPaymentMethodFromStore();
|
||||
|
||||
// Assert
|
||||
expect(paymethod).toBe(payLaterPaymentMethod);
|
||||
});
|
||||
test('getting payment method when method is pay in advance', async () => {
|
||||
// Arrange
|
||||
const payLaterMethod = paymentMethods.PAY_AT_TIME_OF_SERVICE;
|
||||
const store = {
|
||||
order: {
|
||||
payment: {
|
||||
|
|
@ -89,7 +71,26 @@ describe('payment-method.vue', () => {
|
|||
const paymethod = wrapper.vm.getPaymentMethodFromStore();
|
||||
|
||||
// Assert
|
||||
expect(paymethod).toBeNull();
|
||||
expect(paymethod).toBe(payLaterMethod);
|
||||
});
|
||||
test('getting payment method when method is pay in advance', async () => {
|
||||
// Arrange
|
||||
const payInAdvanceMethod = paymentMethods.CREDIT_CARD;
|
||||
const store = {
|
||||
order: {
|
||||
payment: {
|
||||
isPayInAdvance: true,
|
||||
payInAdvanceType: payInAdvanceMethod
|
||||
}
|
||||
}
|
||||
};
|
||||
const wrapper = setupMocks({}, store);
|
||||
|
||||
// Act
|
||||
const paymethod = wrapper.vm.getPaymentMethodFromStore();
|
||||
|
||||
// Assert
|
||||
expect(paymethod).toBe(payInAdvanceMethod);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue