Fixing tests

This commit is contained in:
Michaela Brydon 2024-04-17 12:39:18 -04:00
parent c864ffedea
commit 4ac5b788c8
3 changed files with 31 additions and 19 deletions

View file

@ -475,7 +475,9 @@ describe('cart-dropdown component', () => {
// Arrange
const storeData = {
order: {
policyLookupSuccessful: true,
policy: {
policyLookupSuccessful: true
},
currentDeductible: 250,
lineItems: {
glassParts: null,
@ -504,7 +506,9 @@ describe('cart-dropdown component', () => {
// Arrange
const storeData = {
order: {
policyLookupSuccessful: true,
policy: {
policyLookupSuccessful: true
},
currentDeductible: 250,
lineItems: {
glassParts: [
@ -540,7 +544,9 @@ describe('cart-dropdown component', () => {
// Arrange
const storeData = {
order: {
policyLookupSuccessful: true,
policy: {
policyLookupSuccessful: true
},
currentDeductible: 250,
lineItems: {
glassParts: [{ partType: 'mock', salesTax: 10 }],
@ -575,7 +581,9 @@ describe('cart-dropdown component', () => {
// Arrange
const storeData = {
order: {
policyLookupSuccessful: true,
policy: {
policyLookupSuccessful: true
},
currentDeductible: 250,
lineItems: {
glassParts: [{ partType: 'mock', salesTax: 10 }],
@ -606,7 +614,9 @@ describe('cart-dropdown component', () => {
// Arrange
const storeData = {
order: {
policyLookupSuccessful: true,
policy: {
policyLookupSuccessful: true
},
currentDeductible: 250,
lineItems: {
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 150 }],
@ -642,7 +652,9 @@ describe('cart-dropdown component', () => {
// Arrange
const storeData = {
order: {
policyLookupSuccessful: true,
policy: {
policyLookupSuccessful: true
},
currentDeductible: 250,
lineItems: {
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 100 }],
@ -677,7 +689,6 @@ describe('cart-dropdown component', () => {
// Arrange
const storeData = {
order: {
policyLookupSuccessful: true,
currentDeductible: 0,
lineItems: {
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 100 }],
@ -689,7 +700,8 @@ describe('cart-dropdown component', () => {
insuranceCoverage: { isVerified: true }
},
policy: {
isITAC: true
isITAC: true,
policyLookupSuccessful: true
}
},
issConfig: {
@ -709,7 +721,6 @@ describe('cart-dropdown component', () => {
// Arrange
const storeData = {
order: {
policyLookupSuccessful: true,
currentDeductible: 0,
lineItems: {
glassParts: [{ partType: 'mock', salesTax: 10, sellingPrice: 100 }],
@ -721,7 +732,8 @@ describe('cart-dropdown component', () => {
insuranceCoverage: { isVerified: true }
},
policy: {
noCoverage: true
noCoverage: true,
policyLookupSuccessful: true
}
},
issConfig: {
@ -1769,10 +1781,10 @@ describe('cart-dropdown component', () => {
order: {
policy: {
isITAC: false,
isNoComp: false
isNoComp: false,
policyLookupSuccessful: true
},
currentDeductible: 321,
policyLookupSuccessful: true
currentDeductible: 321
}
};
const { wrapper } = getMountedComponent(storeData);

View file

@ -135,15 +135,15 @@ describe('payment-method.vue', () => {
order: {
policy: {
isITAC: false,
noCoverage: false
noCoverage: false,
policyLookupSuccessful: true
},
payment: {
insuranceCoverage: {
isVerified: true
}
},
currentDeductible: 123,
policyLookupSuccessful: true
currentDeductible: 123
},
issConfig: {
isClaimRegistrationRequired: true,
@ -162,7 +162,7 @@ describe('payment-method.vue', () => {
});
test('returns true when policyLookupSuccessful false', () => {
// Arrange
store.order.policyLookupSuccessful = false;
store.order.policy.policyLookupSuccessful = false;
const wrapper = setupMocks({}, store, mixin);
// Act

View file

@ -1471,13 +1471,13 @@ describe('Store', () => {
store.order.policy.noCoverage = false;
store.order.payment.insuranceCoverage.isVerified = true;
store.order.currentDeductible = 123;
store.order.policyLookupSuccessful = true;
store.order.policy.policyLookupSuccessful = true;
store.issConfig.isClaimRegistrationRequired = true;
store.issConfig.enableNoCompQuote = true;
});
it('returns true when policyLookupSuccessful false', () => {
// Arrange
store.order.policyLookupSuccessful = false;
store.order.policy.policyLookupSuccessful = false;
// Act
const result = store.isUnverified;