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
58 lines
No EOL
2 KiB
TypeScript
58 lines
No EOL
2 KiB
TypeScript
//Imports here
|
|
import { ITestData } from "@business-logic/types/ITestData"
|
|
import { ServicePackage, AppointmentType, PaymentType } from "@business-logic/types/Enums";
|
|
import TestCase from "@business-logic/types/TestCase";
|
|
import { VehicleLookupType } from "@business-logic/types/Enums";
|
|
import { getDefaultTestData, setFakerSeedFromTestName } from "@business-logic/constants/DefaultTestData";
|
|
|
|
// Set the seed based on test name for consistent but unique data
|
|
setFakerSeedFromTestName("CashReplaceWiperPromoInShop");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const cashReplaceWiperPromoInShopData: Partial<ITestData> = {
|
|
...getDefaultTestData(), // Get default data with current seed
|
|
|
|
// Key feature: Standard package with wipers
|
|
servicePackage: ServicePackage.Standard,
|
|
|
|
// Specific wiper promo code
|
|
promoCode: '1WIPER0',
|
|
|
|
// Override customer postal code
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
address: {
|
|
...getDefaultTestData().customerDetails!.address,
|
|
postalCode: '43085'
|
|
}
|
|
},
|
|
|
|
// Override vehicle details - Truck with VIN lookup
|
|
vehicleDetails: {
|
|
...getDefaultTestData().vehicleDetails!,
|
|
year: '2015',
|
|
make: 'Ford',
|
|
model: 'F Series F150',
|
|
style: '2 door standard cab',
|
|
vin: '1FTMF1C87FKD85044',
|
|
vehicleLookupType: VehicleLookupType.Vin
|
|
},
|
|
|
|
// No need to override vehicleDamage as it already defaults to WindshieldCrack
|
|
|
|
// Payment at service
|
|
paymentDetails: {
|
|
paymentType: PaymentType.PayAtService
|
|
}
|
|
}
|
|
|
|
const cashReplaceWiperPromoInShopTests: TestCase[] = [];
|
|
|
|
const tc = new TestCase({
|
|
name: `CashReplaceWiperPromoInShop`,
|
|
tags: ['@E2E','@CashReplaceWiperPromoInShop', '@test_report', '@CASH'],
|
|
testData: cashReplaceWiperPromoInShopData
|
|
}, undefined, 'CashReplaceWiperPromoInShop');
|
|
cashReplaceWiperPromoInShopTests.push(tc);
|
|
|
|
export default cashReplaceWiperPromoInShopTests; |