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 {
|
Object {
|
||||||
"baseServiceLineItems": Array [],
|
"baseServiceLineItems": Array [],
|
||||||
"deductibleText": "Your deductible is",
|
"deductibleText": "Your deductible is",
|
||||||
"isNoComp": false,
|
|
||||||
"isRepair": true,
|
|
||||||
"loadingText": Array [
|
"loadingText": Array [
|
||||||
"Connecting to your insurance company",
|
"Connecting to your insurance company",
|
||||||
"Nearly there",
|
"Nearly there",
|
||||||
"Finishing up",
|
"Finishing up",
|
||||||
],
|
],
|
||||||
"policyLookupSuccessful": true,
|
|
||||||
"rules": Object {
|
"rules": Object {
|
||||||
"selectionRequired": "option-required",
|
"selectionRequired": "option-required",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,8 @@ describe('coverageStatement.vue-working', () => {
|
||||||
isRepair: true
|
isRepair: true
|
||||||
},
|
},
|
||||||
policy: {
|
policy: {
|
||||||
policyLookupSuccessful: true,
|
noCoverage: false,
|
||||||
noCoverage: false
|
policyLookupSuccessful: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1237,11 +1237,15 @@ describe('coverageStatement.vue-working', () => {
|
||||||
const initialStore = {
|
const initialStore = {
|
||||||
order: {
|
order: {
|
||||||
payment: {
|
payment: {
|
||||||
insuranceCoverage: { claimNumber: null }
|
insuranceCoverage: {
|
||||||
|
claimNumber: null,
|
||||||
|
isVerified: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
policy: {
|
policy: {
|
||||||
policyLookupSuccessful: true,
|
noCoverage: false,
|
||||||
noCoverage: false
|
isITAC: false,
|
||||||
|
policyLookupSuccessful: true
|
||||||
},
|
},
|
||||||
vehicle: {
|
vehicle: {
|
||||||
policyVehicleId: 1
|
policyVehicleId: 1
|
||||||
|
|
@ -1262,6 +1266,8 @@ describe('coverageStatement.vue-working', () => {
|
||||||
const { wrapper } = getMountedComponent(initialStore, {}, mockStoreActions);
|
const { wrapper } = getMountedComponent(initialStore, {}, mockStoreActions);
|
||||||
const next = (method) => { method(wrapper.vm); };
|
const next = (method) => { method(wrapper.vm); };
|
||||||
|
|
||||||
|
console.log(wrapper.vm.pageVariation);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
coverageStatement.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next);
|
coverageStatement.beforeRouteEnter.call(wrapper.vm, undefined, undefined, next);
|
||||||
for (let i = 0; i < 7; i++) {
|
for (let i = 0; i < 7; i++) {
|
||||||
|
|
|
||||||
|
|
@ -56,25 +56,7 @@ describe('payment-method.vue', () => {
|
||||||
describe('Payment Method Type', () => {
|
describe('Payment Method Type', () => {
|
||||||
test('getting payment method when method is pay later', async () => {
|
test('getting payment method when method is pay later', async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const payLaterPaymentMethod = paymentMethods.PAY_AT_TIME_OF_SERVICE;
|
const payLaterMethod = 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 store = {
|
const store = {
|
||||||
order: {
|
order: {
|
||||||
payment: {
|
payment: {
|
||||||
|
|
@ -89,7 +71,26 @@ describe('payment-method.vue', () => {
|
||||||
const paymethod = wrapper.vm.getPaymentMethodFromStore();
|
const paymethod = wrapper.vm.getPaymentMethodFromStore();
|
||||||
|
|
||||||
// Assert
|
// 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