Improves the handling of cash to insurance flows, including adding new test cases and adjusting logic for policy verification and payment methods. Also, updates UI elements to ensure correct display of deductible information and handles split windshield scenarios. The `safelite-playwright-core` dependency is updated to version 1.0.22.
74 lines
No EOL
2.4 KiB
TypeScript
74 lines
No EOL
2.4 KiB
TypeScript
//Imports here
|
|
import { ITestData } from 'framework/TestData'
|
|
import { PartQuestionType, PaymentType, VehicleDamage } from 'safelite-playwright-core';
|
|
import { ITestCase } from '../framework/Typedefs'
|
|
import { VehicleLookupType } from 'safelite-playwright-core';
|
|
import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core';
|
|
|
|
// Set the seed before generating any data
|
|
setFakerSeedFromTestName("CashReplaceSplitWindshield.ts");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const CashReplaceSplitWindshieldData: Partial<ITestData> = {
|
|
...getDefaultTestData(), // Get default data with current seed
|
|
|
|
isHeavyTruck: true, // Flag for big truck
|
|
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
address: {
|
|
...getDefaultTestData().customerDetails!.address,
|
|
postalCode: '55414'
|
|
}
|
|
},
|
|
|
|
// Override vehicle details
|
|
vehicleDetails: {
|
|
...getDefaultTestData().vehicleDetails!,
|
|
year: '2006',
|
|
make: 'Navistar',
|
|
model: '5000 I',
|
|
style: '2 door conventional cab',
|
|
vehicleLookupType: VehicleLookupType.Zip
|
|
},
|
|
|
|
vehiclePartQuestions: [
|
|
{
|
|
partQuestionType: PartQuestionType.DriverWindshield,
|
|
isOnPage: true,
|
|
optionToSelect: 'Green Tint',
|
|
secondaryQuestionOptionToSelect: 'driver side, encap, asymmetrically strengthen'
|
|
},
|
|
{
|
|
partQuestionType: PartQuestionType.PassengerWindshield,
|
|
isOnPage: true,
|
|
optionToSelect: 'Green Tint',
|
|
secondaryQuestionOptionToSelect: 'passenger side, encap, asymmetrically strengthen'
|
|
},
|
|
],
|
|
|
|
// Override default vehicle damage (Split Windshield)
|
|
vehicleDamage: [VehicleDamage.DriverSplitWindshield, VehicleDamage.PassengerSplitWindshield],
|
|
|
|
// Override appointment details
|
|
appointmentDetails: {
|
|
...getDefaultTestData().appointmentDetails!,
|
|
shopAddress: "504 Malcolm Ave Se, Minneapolis, MN 55414"
|
|
},
|
|
|
|
// Override payment details
|
|
paymentDetails: {
|
|
paymentType: PaymentType.PayAtService
|
|
}
|
|
}
|
|
|
|
const CashReplaceSplitWindshieldTests: ITestCase[] = [];
|
|
|
|
const tc = {
|
|
name: `CashReplaceSplitWindshield`,
|
|
tags: ['@E2E','@CashReplaceSplitWindshield', '@test_report', '@CASH'],
|
|
testData: CashReplaceSplitWindshieldData
|
|
};
|
|
CashReplaceSplitWindshieldTests.push(tc);
|
|
|
|
export default CashReplaceSplitWindshieldTests; |