DigitalConsumer.FixMyGlass/playwright-tests/tests/alert-validation/alert0004_RepairOnly.ts
maguire-arman a2ca9134d1 Initializes Playwright test framework
Sets up the core infrastructure for Playwright-based automated testing, including:
- Docker support for consistent environments
- Azure Pipelines configuration for CI/CD
- Page Object Model structure for maintainable tests
- Test data, validation, and rule engine implementation
- Test configuration for alerts and other scenarios
2025-05-08 15:45:05 -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;