DigitalConsumer.FixMyGlass/playwright-tests/tests/CashReplaceSplitWindshield.ts
maguire-arman d42371683c Adds CASH-848 tag to relevant tests
Adds the '@CASH-848' tag to several Cash and Insurance related E2E tests.

This tag likely relates to a specific issue or requirement tracked under CASH-848.
2025-07-29 12:57:36 -04:00

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', '@CASH-848'],
testData: CashReplaceSplitWindshieldData
};
CashReplaceSplitWindshieldTests.push(tc);
export default CashReplaceSplitWindshieldTests;