DigitalConsumer.FixMyGlass/playwright-tests/tests/CashReplaceDualNonMSRInshop.ts
2026-05-03 12:24:21 -04:00

82 lines
No EOL
2.3 KiB
TypeScript

//Imports here
import { ITestData, getDefaultExperimentsData } from 'framework/TestData'
import { ServicePackage, PaymentType, PartQuestionType, ServiceLocation } from 'safelite-playwright-core';
import { ITestCase } from '../framework/Typedefs'
import { VehicleLookupType } from 'safelite-playwright-core';
import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core';
import { PaymentMethod } from 'framework/localTypes/Enums';
// Set the seed before generating any data
setFakerSeedFromTestName("CashReplaceDualNonMSRInshop");
// Now get the test data with the seeded faker
const CashReplaceDualMobileMSRData: Partial<ITestData> = {
...getDefaultTestData(), // Get default data with current seed
// CASH Client
paymentMethod: PaymentMethod.SelfPay,
// Key feature: Premium package with Rain Defense
servicePackage: ServicePackage.Standard,
// Flag for recalibration vehicle
isRecalVehicle: true,
// Override customer details
customerDetails: {
...getDefaultTestData().customerDetails!,
address: {
...getDefaultTestData().customerDetails!.address,
postalCode: '43085'
// postalCode: '21237'
}
},
// override part questions
partQuestions: [
{
partQuestionType: PartQuestionType.GeneralQuestion1,
isOnPage: true,
optionToSelect: 'Yes'
}
],
// Override vehicle details
vehicleDetails: {
...getDefaultTestData().vehicleDetails!,
year: '2024',
make: 'Subaru',
model: 'Ascent',
style: '4 door utility',
vehicleLookupType: VehicleLookupType.Zip
},
mockFirstInshopCallNoSchedule: true,
isMSRGlassPart: false,
isMSRZip: true,
// Payment at service
paymentDetails: {
paymentType: PaymentType.PayAtService
},
// Flag for PIA disabled
isPIAEnabled: false,
// Experiments
experiments: {
...getDefaultExperimentsData()
}
}
const cashReplaceDualNonMSRInshopTests: ITestCase[] = [];
const tc = {
name: `CashReplaceDualNonMSRInshop`,
tags: ['@E2E', '@CashReplaceDualNonMSRInshop', '@test_report', '@CASH'],
testData: CashReplaceDualMobileMSRData
};
cashReplaceDualNonMSRInshopTests.push(tc);
export default cashReplaceDualNonMSRInshopTests;