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.
63 lines
No EOL
2 KiB
TypeScript
63 lines
No EOL
2 KiB
TypeScript
//Imports here
|
|
import { ITestData } from 'framework/TestData'
|
|
import { VehicleDamage, ServiceLocation } from 'safelite-playwright-core';
|
|
import { ITestCase } from '../framework/Typedefs'
|
|
import { ClientData } 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("CashRepairMobileCreditCard");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const cashRepairMobileCCData : Partial<ITestData> = {
|
|
...getDefaultTestData(), // Get default data with current seed
|
|
|
|
// CASH Client
|
|
paymentMethod: PaymentMethod.SelfPay,
|
|
|
|
// Override default vehicle damage (Windshield Crack)
|
|
vehicleDamage: [VehicleDamage.WindshieldOneChip],
|
|
|
|
// Override customer postal code
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
address: {
|
|
...getDefaultTestData().customerDetails!.address,
|
|
postalCode: '91710'
|
|
}
|
|
},
|
|
|
|
// Override specific fields with test-specific data
|
|
vehicleDetails: {
|
|
...getDefaultTestData().vehicleDetails!,
|
|
vin: '1HGCV2E35LA005448'
|
|
},
|
|
|
|
// Override appointment details
|
|
appointmentDetails: {
|
|
serviceLocation: ServiceLocation.Mobile,
|
|
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate,
|
|
serviceAddress: {
|
|
street: '13735 San Antonio Ave',
|
|
city: 'Chino',
|
|
state: 'CA',
|
|
postalCode: '91710',
|
|
country: 'United States'
|
|
}
|
|
},
|
|
|
|
// Use predefined payment data
|
|
paymentDetails: ClientData.getDefaultCreditCardDetails()
|
|
}
|
|
|
|
const cashRepairMobileCCTests: ITestCase[] = [];
|
|
|
|
const tc = {
|
|
name: `CashRepairMobileCreditCard`,
|
|
tags: ['@E2E','@CashRepairMobileCreditCard', '@test_report', '@CASH', '@CASH-848'],
|
|
testData: cashRepairMobileCCData
|
|
};
|
|
cashRepairMobileCCTests.push(tc);
|
|
|
|
export default cashRepairMobileCCTests; |