DigitalConsumer.FixMyGlass/playwright-tests/tests/alert-validation/alert0004_RepairOnly.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

41 lines
No EOL
1.3 KiB
TypeScript

// Imports here
import { ITestData } from "@business-logic/types/ITestData";
import { VehicleDamage, AppointmentType, VehicleLookupType } 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";
// Replace selected when not offered (alert) Test Data
const repairOnlyData: Partial<ITestData> = {
...defaultTestData, // Start with all defaults
// Override specific fields with test-specific data
vehicleDetails: {
...defaultTestData.vehicleDetails!,
year: '2023',
make: 'Motor Home',
model: 'Motor Home',
style: 'motor home'
},
vehicleDamage: [
VehicleDamage.WindshieldCrack
],
appointmentDetails: {
serviceLocation: AppointmentType.DropOff,
appointmentDate: getNextWeekday()
},
alertFlags: {
isRepairOnly: true
}
};
const repairOnlyTests: TestCase[] = [];
const tc = new TestCase({
name: `alert0004 Replace selected when not offered`,
tags: ['@Alert', '@RepairOnly', '@test_report'],
testData: repairOnlyData
}, undefined, 'RepairOnly');
repairOnlyTests.push(tc);
export default repairOnlyTests;