92 lines
No EOL
2.8 KiB
TypeScript
92 lines
No EOL
2.8 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("CashReplaceStaticMobileMSR");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const CashReplaceStaticMobileMSRData: 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: '2023',
|
|
make: 'Hyundai',
|
|
model: 'Elantra',
|
|
style: '4 door sedan',
|
|
vin: '3FA6P0HD8LR234510',
|
|
vehicleLookupType: VehicleLookupType.Zip
|
|
},
|
|
|
|
mockFirstInshopCallNoSchedule: true,
|
|
|
|
// No need to override vehicleDamage as it already defaults to WindshieldCrack
|
|
// Override appointment details
|
|
appointmentDetails: {
|
|
serviceLocation: ServiceLocation.Mobile,
|
|
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate,
|
|
serviceAddress: {
|
|
// Use street address from current faker seed
|
|
street: "649 High Street",
|
|
city: 'Worthington',
|
|
state: 'OH',
|
|
postalCode: '43085', //
|
|
country: 'United States'
|
|
},
|
|
},
|
|
|
|
// Payment at service
|
|
paymentDetails: {
|
|
paymentType: PaymentType.PayAtService
|
|
},
|
|
|
|
// Experiments
|
|
experiments: {
|
|
...getDefaultExperimentsData()
|
|
}
|
|
}
|
|
|
|
const cashReplaceStaticMobileMSRTests: ITestCase[] = [];
|
|
|
|
const tc = {
|
|
name: `cashReplaceStaticMobileMSR`,
|
|
tags: ['@E2E','@cashReplaceStaticMobileMSR', '@test_report', '@CASH'],
|
|
testData: CashReplaceStaticMobileMSRData
|
|
};
|
|
cashReplaceStaticMobileMSRTests.push(tc);
|
|
|
|
export default cashReplaceStaticMobileMSRTests; |