74 lines
No EOL
2.4 KiB
TypeScript
74 lines
No EOL
2.4 KiB
TypeScript
//Imports here
|
|
import { ITestData } from 'framework/TestData'
|
|
import { AppointmentTimeslot, ServiceLocation, PaymentType } 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 based on test name for consistent but unique data
|
|
setFakerSeedFromTestName("CashReplaceVinMobile");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const cashReplaceVinMobileData: Partial<ITestData> = {
|
|
...getDefaultTestData(), // Get default data with current seed
|
|
|
|
// CASH Client
|
|
paymentMethod: PaymentMethod.SelfPay,
|
|
|
|
// Flag for recalibration vehicle
|
|
isRecalVehicle: true,
|
|
|
|
// Override customer postal code
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
address: {
|
|
...getDefaultTestData().customerDetails!.address,
|
|
postalCode: '21237'
|
|
}
|
|
},
|
|
|
|
// Override vehicle details - using VIN lookup
|
|
vehicleDetails: {
|
|
...getDefaultTestData().vehicleDetails!,
|
|
year: '2012',
|
|
make: 'Honda',
|
|
model: 'Accord',
|
|
style: '4 door sedan',
|
|
vin: '1HGCP3F83CA040466',
|
|
vehicleLookupType: VehicleLookupType.Vin
|
|
},
|
|
|
|
// No need to override vehicleDamage as it already defaults to WindshieldCrack
|
|
|
|
// Override for mobile service
|
|
appointmentDetails: {
|
|
serviceLocation: ServiceLocation.Mobile,
|
|
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate,
|
|
serviceAddress: {
|
|
// Use street address from current faker seed
|
|
street: "5050 Silver Oak Dr",
|
|
city: 'Rosedale',
|
|
state: 'MD',
|
|
postalCode: '21237',
|
|
country: 'United States'
|
|
},
|
|
appointmentTimeSlot: AppointmentTimeslot.EarlyBird
|
|
},
|
|
|
|
// Payment at service
|
|
paymentDetails: {
|
|
paymentType: PaymentType.PayAtService
|
|
},
|
|
}
|
|
|
|
const cashReplaceVinMobileTests: ITestCase[] = [];
|
|
|
|
const tc = {
|
|
name: `CashReplaceVinMobile`,
|
|
tags: ['@E2E','@CashReplaceVinMobile', '@test_report', '@CASH', '@CASH-1182'],
|
|
testData: cashReplaceVinMobileData
|
|
};
|
|
cashReplaceVinMobileTests.push(tc);
|
|
|
|
export default cashReplaceVinMobileTests; |