53 lines
No EOL
1.5 KiB
TypeScript
53 lines
No EOL
1.5 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, getDefaultTestData } from "@business-logic/constants/DefaultTestData";
|
|
|
|
// Heavy Truck (alert) Test Data
|
|
const heavyTruckData: Partial<ITestData> = {
|
|
...defaultTestData, // Start with all defaults
|
|
|
|
|
|
isHeavyTruck: true, // Flag for heavy truck vehicle
|
|
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
address: {
|
|
...getDefaultTestData().customerDetails!.address,
|
|
postalCode: '21237'
|
|
}
|
|
},
|
|
|
|
// Override specific fields with test-specific data
|
|
vehicleDetails: {
|
|
...defaultTestData.vehicleDetails!,
|
|
year: '2017',
|
|
make: 'Freightliner',
|
|
model: '114sd',
|
|
style: 'conventional cab'
|
|
},
|
|
alertFlags: {
|
|
isHeavyTruckVehicleAlert: 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; |