Merge pull request #624 from Safelite/bug/digital/always-unverified
Actually referencing policy successful
This commit is contained in:
commit
642334cdf3
4 changed files with 33 additions and 20 deletions
|
|
@ -475,7 +475,9 @@ describe('cart-dropdown component', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const storeData = {
|
const storeData = {
|
||||||
order: {
|
order: {
|
||||||
policyLookupSuccessful: true,
|
policy: {
|
||||||
|
policyLookupSuccessful: true
|
||||||
|
},
|
||||||
currentDeductible: 250,
|
currentDeductible: 250,
|
||||||
lineItems: {
|
lineItems: {
|
||||||
glassParts: null,
|
glassParts: null,
|
||||||
|
|
@ -504,7 +506,9 @@ describe('cart-dropdown component', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const storeData = {
|
const storeData = {
|
||||||
order: {
|
order: {
|
||||||
policyLookupSuccessful: true,
|
policy: {
|
||||||
|
policyLookupSuccessful: true
|
||||||
|
},
|
||||||
currentDeductible: 250,
|
currentDeductible: 250,
|
||||||
lineItems: {
|
lineItems: {
|
||||||
glassParts: [
|
glassParts: [
|
||||||
|
|
@ -540,7 +544,9 @@ describe('cart-dropdown component', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const storeData = {
|
const storeData = {
|
||||||
order: {
|
order: {
|
||||||
policyLookupSuccessful: true,
|
policy: {
|
||||||
|
policyLookupSuccessful: true
|
||||||
|
},
|
||||||
currentDeductible: 250,
|
currentDeductible: 250,
|
||||||
lineItems: {
|
lineItems: {
|
||||||
glassParts: [{ partType: 'mock', salesTax: 10 }],
|
glassParts: [{ partType: 'mock', salesTax: 10 }],
|
||||||
|
|
@ -575,7 +581,9 @@ describe('cart-dropdown component', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const storeData = {
|
const storeData = {
|
||||||
order: {
|
order: {
|
||||||
policyLookupSuccessful: true,
|
policy: {
|
||||||
|
policyLookupSuccessful: true
|
||||||
|
},
|
||||||
currentDeductible: 250,
|
currentDeductible: 250,
|
||||||
lineItems: {
|
lineItems: {
|
||||||
glassParts: [{ partType: 'mock', salesTax: 10 }],
|
glassParts: [{ partType: 'mock', salesTax: 10 }],
|
||||||
|
|
@ -606,7 +614,9 @@ describe('cart-dropdown component', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const storeData = {
|
const storeData = {
|
||||||
order: {
|
order: {
|
||||||
policyLookupSuccessful: true,
|
policy: {
|
||||||
|
policyLookupSuccessful: true
|
||||||
|
},
|
||||||
currentDeductible: 250,
|
currentDeductible: 250,
|
||||||
lineItems: {
|
lineItems: {
|
||||||
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 150 }],
|
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 150 }],
|
||||||
|
|
@ -642,7 +652,9 @@ describe('cart-dropdown component', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const storeData = {
|
const storeData = {
|
||||||
order: {
|
order: {
|
||||||
policyLookupSuccessful: true,
|
policy: {
|
||||||
|
policyLookupSuccessful: true
|
||||||
|
},
|
||||||
currentDeductible: 250,
|
currentDeductible: 250,
|
||||||
lineItems: {
|
lineItems: {
|
||||||
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 100 }],
|
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 100 }],
|
||||||
|
|
@ -677,7 +689,6 @@ describe('cart-dropdown component', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const storeData = {
|
const storeData = {
|
||||||
order: {
|
order: {
|
||||||
policyLookupSuccessful: true,
|
|
||||||
currentDeductible: 0,
|
currentDeductible: 0,
|
||||||
lineItems: {
|
lineItems: {
|
||||||
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 100 }],
|
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 100 }],
|
||||||
|
|
@ -689,7 +700,8 @@ describe('cart-dropdown component', () => {
|
||||||
insuranceCoverage: { isVerified: true }
|
insuranceCoverage: { isVerified: true }
|
||||||
},
|
},
|
||||||
policy: {
|
policy: {
|
||||||
isITAC: true
|
isITAC: true,
|
||||||
|
policyLookupSuccessful: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
issConfig: {
|
issConfig: {
|
||||||
|
|
@ -709,7 +721,6 @@ describe('cart-dropdown component', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const storeData = {
|
const storeData = {
|
||||||
order: {
|
order: {
|
||||||
policyLookupSuccessful: true,
|
|
||||||
currentDeductible: 0,
|
currentDeductible: 0,
|
||||||
lineItems: {
|
lineItems: {
|
||||||
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 100 }],
|
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 100 }],
|
||||||
|
|
@ -721,7 +732,8 @@ describe('cart-dropdown component', () => {
|
||||||
insuranceCoverage: { isVerified: true }
|
insuranceCoverage: { isVerified: true }
|
||||||
},
|
},
|
||||||
policy: {
|
policy: {
|
||||||
noCoverage: true
|
noCoverage: true,
|
||||||
|
policyLookupSuccessful: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
issConfig: {
|
issConfig: {
|
||||||
|
|
@ -1769,10 +1781,10 @@ describe('cart-dropdown component', () => {
|
||||||
order: {
|
order: {
|
||||||
policy: {
|
policy: {
|
||||||
isITAC: false,
|
isITAC: false,
|
||||||
isNoComp: false
|
isNoComp: false,
|
||||||
|
policyLookupSuccessful: true
|
||||||
},
|
},
|
||||||
currentDeductible: 321,
|
currentDeductible: 321
|
||||||
policyLookupSuccessful: true
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const { wrapper } = getMountedComponent(storeData);
|
const { wrapper } = getMountedComponent(storeData);
|
||||||
|
|
|
||||||
|
|
@ -135,15 +135,15 @@ describe('payment-method.vue', () => {
|
||||||
order: {
|
order: {
|
||||||
policy: {
|
policy: {
|
||||||
isITAC: false,
|
isITAC: false,
|
||||||
noCoverage: false
|
noCoverage: false,
|
||||||
|
policyLookupSuccessful: true
|
||||||
},
|
},
|
||||||
payment: {
|
payment: {
|
||||||
insuranceCoverage: {
|
insuranceCoverage: {
|
||||||
isVerified: true
|
isVerified: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
currentDeductible: 123,
|
currentDeductible: 123
|
||||||
policyLookupSuccessful: true
|
|
||||||
},
|
},
|
||||||
issConfig: {
|
issConfig: {
|
||||||
isClaimRegistrationRequired: true,
|
isClaimRegistrationRequired: true,
|
||||||
|
|
@ -162,7 +162,7 @@ describe('payment-method.vue', () => {
|
||||||
});
|
});
|
||||||
test('returns true when policyLookupSuccessful false', () => {
|
test('returns true when policyLookupSuccessful false', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
store.order.policyLookupSuccessful = false;
|
store.order.policy.policyLookupSuccessful = false;
|
||||||
const wrapper = setupMocks({}, store, mixin);
|
const wrapper = setupMocks({}, store, mixin);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,8 @@ export const useMainStore = defineStore({
|
||||||
isNoComp: (s) => !!s.order.policy.noCoverage,
|
isNoComp: (s) => !!s.order.policy.noCoverage,
|
||||||
isITAC: (state) => !!state.order.policy.isITAC,
|
isITAC: (state) => !!state.order.policy.isITAC,
|
||||||
isUnverified: (s) => {
|
isUnverified: (s) => {
|
||||||
const { policyLookupSuccessful, payment, currentDeductible } = s.order;
|
const { payment, currentDeductible, policy } = s.order;
|
||||||
|
const { policyLookupSuccessful } = policy;
|
||||||
const registerClaimSuccessful = !!payment.insuranceCoverage.isVerified;
|
const registerClaimSuccessful = !!payment.insuranceCoverage.isVerified;
|
||||||
if (!policyLookupSuccessful) {
|
if (!policyLookupSuccessful) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1471,13 +1471,13 @@ describe('Store', () => {
|
||||||
store.order.policy.noCoverage = false;
|
store.order.policy.noCoverage = false;
|
||||||
store.order.payment.insuranceCoverage.isVerified = true;
|
store.order.payment.insuranceCoverage.isVerified = true;
|
||||||
store.order.currentDeductible = 123;
|
store.order.currentDeductible = 123;
|
||||||
store.order.policyLookupSuccessful = true;
|
store.order.policy.policyLookupSuccessful = true;
|
||||||
store.issConfig.isClaimRegistrationRequired = true;
|
store.issConfig.isClaimRegistrationRequired = true;
|
||||||
store.issConfig.enableNoCompQuote = true;
|
store.issConfig.enableNoCompQuote = true;
|
||||||
});
|
});
|
||||||
it('returns true when policyLookupSuccessful false', () => {
|
it('returns true when policyLookupSuccessful false', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
store.order.policyLookupSuccessful = false;
|
store.order.policy.policyLookupSuccessful = false;
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
const result = store.isUnverified;
|
const result = store.isUnverified;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue