DigitalConsumer.FixMyGlass/playwright-tests/tests/alert-validation/alert0001_HeavyTruck.ts
maguire-arman 404dda6556 Adds Playwright test framework for FMG
Initial commit of the Playwright test framework, including:
- Configuration files for Playwright, Docker, and Sauce Labs
- Test case structure and page object models
- CI/CD pipeline configuration
- Utilities and business logic implementations

This framework will be used for end-to-end testing of the FMG application.
2025-04-07 15:40:31 -04:00

42 lines
No EOL
1.2 KiB
TypeScript

//Imports here
import { ITestData } from "@business-logic/types/ITestData"
import { VehicleDamage, AppointmentType } from "@business-logic/types/Enums";
import TestCase from "@business-logic/types/TestCase";
import { getNextWeekday } from "@impl/utils/DateUtils";
import { defaultTestData } from "@business-logic/constants/DefaultTestData";
// Heavy Truck (alert) Test Data
const heavyTruckData: Partial<ITestData> = {
...defaultTestData, // Start with all defaults
// Override specific fields with test-specific data
vehicleDetails: {
...defaultTestData.vehicleDetails!,
year: '2017',
make: 'Freightliner',
model: '114sd',
style: 'conventional cab'
},
alertFlags: {
isHeavyTruckVehicle: true
},
vehicleDamage: [
VehicleDamage.WindshieldOneChip,
VehicleDamage.RearWindow
],
appointmentDetails: {
serviceLocation: AppointmentType.DropOff,
appointmentDate: getNextWeekday()
}
};
const heavyTruckTests: TestCase[] = [];
const tc = new TestCase({
name: `alert0001 Heavy Truck`,
tags: ['@Alert', '@HeavyTruck', '@test_report'],
testData: heavyTruckData
}, undefined, 'HeavyTruck');
heavyTruckTests.push(tc);
export default heavyTruckTests;