diff --git a/src/iss-components/cart-dropdown/__snapshots__/cart-dropdown.spec.js.snap b/src/iss-components/cart-dropdown/__snapshots__/cart-dropdown.spec.js.snap
index 9ade738d..dc913570 100644
--- a/src/iss-components/cart-dropdown/__snapshots__/cart-dropdown.spec.js.snap
+++ b/src/iss-components/cart-dropdown/__snapshots__/cart-dropdown.spec.js.snap
@@ -10,6 +10,7 @@ Object {
"isExpanded": false,
"widget": Object {
"amountDue": "AmountDueTextWidget",
+ "amountPaid": "AmountPaidTextWidget",
"basePrice": "BasePriceWidget",
"deductible": "DeductibleWidget",
"mobileFee": "MobileServiceWidget",
diff --git a/src/iss-components/cart-dropdown/cart-dropdown.spec.js b/src/iss-components/cart-dropdown/cart-dropdown.spec.js
index 80ee78d9..5977a501 100644
--- a/src/iss-components/cart-dropdown/cart-dropdown.spec.js
+++ b/src/iss-components/cart-dropdown/cart-dropdown.spec.js
@@ -225,6 +225,27 @@ describe('cart-dropdown component', () => {
// Assert
expect(salesTax.exists()).toBeTruthy();
});
+ test('amount paid when Pay in Advance', () => {
+ // Arrange
+ const reference = '#cart-amount-paid';
+ const isExpanded = true;
+ const showAsPaid = true;
+ const initialPropsData = { isExpanded, showAsPaid };
+ const storeData = {
+ order: {
+ payment: {
+ isPayInAdvance: true
+ }
+ }
+ };
+ const { wrapper } = getMountedComponent(storeData, {}, initialPropsData);
+
+ // Act
+ const amountPaid = wrapper.find(reference);
+
+ // Assert
+ expect(amountPaid.exists()).toBeTruthy();
+ });
test('bottom amount due', () => {
// Arrange
const reference = '#bottom-amount-due';
@@ -593,7 +614,13 @@ describe('cart-dropdown component', () => {
vaps: null
},
payment: {
- insuranceCoverage: { isVerified: true }
+ insuranceCoverage: {
+ coverageStatus: coverageStatuses.VERIFIED
+ }
+ },
+ policy: {
+ noCoverage: false,
+ isITAC: false
}
},
issConfig: {
@@ -629,7 +656,9 @@ describe('cart-dropdown component', () => {
]
},
payment: {
- insuranceCoverage: { isVerified: true }
+ insuranceCoverage: {
+ coverageStatus: coverageStatuses.VERIFIED
+ }
}
},
issConfig: {
@@ -1744,7 +1773,12 @@ describe('cart-dropdown component', () => {
isNoComp: false
},
currentDeductible: 321,
- policyLookupSuccessful: true
+ policyLookupSuccessful: true,
+ payment: {
+ insuranceCoverage: {
+ coverageStatus: coverageStatuses.VERIFIED
+ }
+ },
}
};
const { wrapper } = getMountedComponent(storeData);
diff --git a/src/iss-components/cart-dropdown/cart-dropdown.vue b/src/iss-components/cart-dropdown/cart-dropdown.vue
index a7c1581d..e956e462 100644
--- a/src/iss-components/cart-dropdown/cart-dropdown.vue
+++ b/src/iss-components/cart-dropdown/cart-dropdown.vue
@@ -125,7 +125,7 @@
{{ amountPaidLabel }}
{{ getDisplayed(amountPaid) }}
@@ -224,12 +224,12 @@ export default {
baseServicePrice() {
return getPriceOfLineItems(this.baseServiceLineItems) ?? 0;
},
- isVerified() {
- return this.submittedOrder ? this.submittedOrder.payment.isVerified : useMainStore().isVerifiedCoverageStatus;
+ isVerifiedCoverageStatus() {
+ return this.submittedOrder ? this.submittedOrder.payment.insuranceCoverage.isVerified : useMainStore().isVerifiedCoverageStatus;
},
isUnverified() {
return !this.isNoComp && !this.isITAC
- && (this.deductible == null || this.isUnverified);
+ && (this.deductible == null || !this.isVerifiedCoverageStatus);
},
isITAC() {
return this.submittedOrder ? this.submittedOrder.policy.isITAC : useMainStore().isITAC;
@@ -268,7 +268,7 @@ export default {
let result = 0;
- if (this.isVerified) {
+ if (!this.isUnverified) {
if (this.isITAC || this.isNoComp) {
result += sumTax(this.baseServiceLineItems);
} else {
diff --git a/src/layouts/order-confirmation/order-confirmation.spec.js b/src/layouts/order-confirmation/order-confirmation.spec.js
index 2eb8208e..83ae6067 100644
--- a/src/layouts/order-confirmation/order-confirmation.spec.js
+++ b/src/layouts/order-confirmation/order-confirmation.spec.js
@@ -14,7 +14,8 @@ jest.mock('@/helpers/layout-helper.js', () => jest.fn());
jest.mock('@/helpers/cms-content-helper', () => ({
fetchCmsContentForPage: jest.fn(),
- processIfStatements: jest.fn()
+ processIfStatements: jest.fn(),
+ splitCopyOnCMSPlaceHolder: jest.fn()
}));
const wordingText = 'wording text {custom:address}';
@@ -105,7 +106,17 @@ const sessionStorage = {
zipCode: '12345'
}
}
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
const sessionStorageMock = (() => {
@@ -302,7 +313,17 @@ describe('OrderConfirmation.vue', () => {
},
serviceLocation: {
appointmentType: 'Mobile'
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();
@@ -331,7 +352,17 @@ describe('OrderConfirmation.vue', () => {
zipCode: '12345'
}
}
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();
@@ -368,7 +399,17 @@ describe('OrderConfirmation.vue', () => {
state: 'AZ',
zipCode: '12345',
appointmentType: 'Mobile'
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();
@@ -397,7 +438,17 @@ describe('OrderConfirmation.vue', () => {
}
},
appointmentType: 'Dropoff'
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();
@@ -426,7 +477,17 @@ describe('OrderConfirmation.vue', () => {
}
},
appointmentType: 'Inshop'
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();
@@ -452,7 +513,17 @@ describe('OrderConfirmation.vue', () => {
state: 'AZ',
zipCode: '12345',
appointmentType: 'Mobile'
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();
@@ -481,7 +552,17 @@ describe('OrderConfirmation.vue', () => {
}
},
appointmentType: 'Inshop'
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();
@@ -507,7 +588,17 @@ describe('OrderConfirmation.vue', () => {
state: 'AZ',
zipCode: '12345',
appointmentType: 'Mobile'
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();
@@ -536,7 +627,17 @@ describe('OrderConfirmation.vue', () => {
}
},
appointmentType: 'Dropoff'
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();
@@ -566,7 +667,17 @@ describe('OrderConfirmation.vue', () => {
}
},
appointmentType: 'Inshop'
- }
+ },
+ payment: {
+ isPayInAdvance: false
+ },
+ lineItems: {
+ vaps: []
+ },
+ policy: {
+ noCoverage: false
+ },
+ damage: {}
};
window.sessionStorage.setItem('submittedOrder', JSON.stringify(testSessionStorage));
const { wrapper } = getMountedComponent();