unit test fix WIP
This commit is contained in:
parent
deec1854fb
commit
861841a68b
2 changed files with 163 additions and 8 deletions
|
|
@ -2,12 +2,6 @@
|
|||
|
||||
exports[`cart-dropdown component initial data rendered as expected 1`] = `
|
||||
Object {
|
||||
"availableVaps": Array [],
|
||||
"cartItemType": Object {
|
||||
"MOBILE_FEE": "MOBILE FEE",
|
||||
"RECYCLE_FEE": "RECYCLE FEE",
|
||||
"VAP": "VAP",
|
||||
},
|
||||
"isExpanded": false,
|
||||
"widget": Object {
|
||||
"amountDue": "AmountDueTextWidget",
|
||||
|
|
@ -21,5 +15,164 @@ Object {
|
|||
"subtotal": "SubtotalWidget",
|
||||
"vapsItemDescriptions": "VapsItemDescriptions",
|
||||
},
|
||||
"availableVaps": Array [],
|
||||
"cartItemType": Object {
|
||||
"MOBILE_FEE": "MOBILE FEE",
|
||||
"RECYCLE_FEE": "RECYCLE FEE",
|
||||
"VAP": "VAP",
|
||||
},
|
||||
"cartOrder": Object {
|
||||
"availableVaps": Array [],
|
||||
"carrierPhoneNumber": null,
|
||||
"contactInfo": Object {
|
||||
"alternativePhone": null,
|
||||
"emailAddress": null,
|
||||
"firstName": null,
|
||||
"homePhone": null,
|
||||
"lastName": null,
|
||||
"notesForTechnician": "",
|
||||
"requestTextUpdates": false,
|
||||
"servicePhone": null,
|
||||
},
|
||||
"currentDeductible": null,
|
||||
"customer": Object {
|
||||
"address": Object {
|
||||
"city": null,
|
||||
"state": null,
|
||||
"streetAddress": null,
|
||||
"streetAddress2": null,
|
||||
"zipCode": null,
|
||||
},
|
||||
"emailAddress": null,
|
||||
"firstName": null,
|
||||
"lastName": null,
|
||||
},
|
||||
"customerPortalLoginToken": null,
|
||||
"damage": Object {
|
||||
"capabilityQuestionAnswers": null,
|
||||
"glassToReplace": null,
|
||||
"isRepair": null,
|
||||
"moldingQuestionAnswers": null,
|
||||
"numberOfChips": null,
|
||||
"partQuestionAnswers": null,
|
||||
},
|
||||
"eon": null,
|
||||
"lineItems": Object {
|
||||
"feeItems": Array [],
|
||||
"glassParts": null,
|
||||
"otherParts": null,
|
||||
"serverData": null,
|
||||
"supportingItems": null,
|
||||
"vaps": null,
|
||||
},
|
||||
"loadedFromDupeCheck": null,
|
||||
"loadedSessionClearedPreviousData": null,
|
||||
"originalDeductible": null,
|
||||
"payment": Object {
|
||||
"creditCardToken": Object {
|
||||
"authCode": null,
|
||||
"billToFirstName": null,
|
||||
"billToLastName": null,
|
||||
"billToPostalCode": null,
|
||||
"cardType": null,
|
||||
"expMonth": null,
|
||||
"expYear": null,
|
||||
"lastFour": null,
|
||||
"referenceNumber": null,
|
||||
"subscriptionId": null,
|
||||
"transReferenceNumber": null,
|
||||
"transactionId": null,
|
||||
},
|
||||
"insuranceCoverage": Object {
|
||||
"claimNumber": null,
|
||||
"coverageStatus": 0,
|
||||
"isVerified": false,
|
||||
},
|
||||
"isPayInAdvance": null,
|
||||
"parentAccountNumber": 0,
|
||||
"payInAdvanceType": null,
|
||||
"paypalToken": null,
|
||||
},
|
||||
"policy": Object {
|
||||
"damageCause": null,
|
||||
"damageCity": null,
|
||||
"damageState": null,
|
||||
"dateOfLoss": null,
|
||||
"deductible": Object {
|
||||
"repair": null,
|
||||
"replace": null,
|
||||
},
|
||||
"endorsementQuestionAnswers": Array [],
|
||||
"endorsements": Array [],
|
||||
"isDamageGlassOnly": null,
|
||||
"isITAC": false,
|
||||
"noCoverage": null,
|
||||
"policyData": null,
|
||||
"policyLookupSuccessful": null,
|
||||
"policyNumber": null,
|
||||
"policyZipCode": null,
|
||||
"status": null,
|
||||
"vehicles": Array [],
|
||||
},
|
||||
"referralCorrelationId": "00000000-0000-0000-0000-000000000000",
|
||||
"referralDate": null,
|
||||
"referralNumber": null,
|
||||
"referralSequenceNumber": null,
|
||||
"schedule": Object {
|
||||
"date": null,
|
||||
"endTime": null,
|
||||
"jobMaxMinutes": null,
|
||||
"jobMinMinutes": null,
|
||||
"routeCode": null,
|
||||
"startTime": null,
|
||||
},
|
||||
"serviceLocation": Object {
|
||||
"IsSafeliteProvider": null,
|
||||
"address": null,
|
||||
"address2": null,
|
||||
"appointmentType": null,
|
||||
"city": null,
|
||||
"isVehicleProtected": null,
|
||||
"provider": Object {
|
||||
"address": Object {
|
||||
"city": null,
|
||||
"state": null,
|
||||
"streetAddress": null,
|
||||
"zipCode": null,
|
||||
"zipCodeCtu": null,
|
||||
},
|
||||
"companyName": null,
|
||||
"phoneNumber": null,
|
||||
"providerNumber": null,
|
||||
},
|
||||
"searchFilter": null,
|
||||
"state": null,
|
||||
"zipCode": null,
|
||||
"zipCodeCtu": null,
|
||||
},
|
||||
"vehicle": Object {
|
||||
"carId": null,
|
||||
"category": null,
|
||||
"imageColor": null,
|
||||
"imageUrl": null,
|
||||
"imageVifNumber": null,
|
||||
"make": null,
|
||||
"model": null,
|
||||
"policyVehicleId": null,
|
||||
"registration": Object {
|
||||
"address": null,
|
||||
"city": null,
|
||||
"firstName": null,
|
||||
"lastName": null,
|
||||
"licensePlate": null,
|
||||
"state": null,
|
||||
"zipCode": null,
|
||||
},
|
||||
"style": null,
|
||||
"vin": null,
|
||||
"year": null,
|
||||
},
|
||||
"workOrderNumber": null,
|
||||
},
|
||||
}
|
||||
`;
|
||||
|
|
|
|||
|
|
@ -60,13 +60,15 @@ beforeEach(() => {
|
|||
describe('cart-dropdown component', () => {
|
||||
test('initial data rendered as expected', () => {
|
||||
// Arrange
|
||||
const { wrapper } = getMountedComponent({
|
||||
const mainInitialState = {
|
||||
order: {
|
||||
availableVaps: []
|
||||
}
|
||||
});
|
||||
};
|
||||
const { wrapper } = getMountedComponent(mainInitialState);
|
||||
|
||||
// Assert
|
||||
console.log(wrapper.vm.$data);
|
||||
expect(wrapper.vm.$data).toMatchSnapshot();
|
||||
});
|
||||
describe('displays', () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue