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.
62 lines
No EOL
2.2 KiB
TypeScript
62 lines
No EOL
2.2 KiB
TypeScript
//Imports here
|
|
import { ITestData } from "@business-logic/types/ITestData"
|
|
import TestCase from "@business-logic/types/TestCase";
|
|
import { VehicleLookupType } from "@business-logic/types/Enums";
|
|
import PaymentData from "@business-logic/Data/PaymentData";
|
|
import { getDefaultTestData, setFakerSeedFromTestName } from "@business-logic/constants/DefaultTestData";
|
|
|
|
// Set the seed before generating any data
|
|
setFakerSeedFromTestName("CashReplaceGlassAddressLookupInshopAfterPay");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const cashReplaceGlassAddressLookupInshopAfterPayData: Partial<ITestData> = {
|
|
...getDefaultTestData(), // Get default data with current seed
|
|
|
|
// Enable entering funnel with ZIP
|
|
enterFunnelWithZip: true,
|
|
|
|
// Override customer details
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
lastName: 'Patel',
|
|
address: {
|
|
street: '4076 Spectacle Dr',
|
|
city: 'Columbus',
|
|
state: 'Ohio',
|
|
postalCode: '43230',
|
|
country: 'United States'
|
|
}
|
|
},
|
|
|
|
// Override vehicle details
|
|
vehicleDetails: {
|
|
...getDefaultTestData().vehicleDetails!,
|
|
year: '2013',
|
|
make: 'Hyundai',
|
|
model: 'Sonata',
|
|
style: '4 door sedan',
|
|
vehicleLookupType: VehicleLookupType.Address
|
|
},
|
|
|
|
// No need to override vehicleDamage as it already defaults to WindshieldCrack
|
|
|
|
// Override appointment details
|
|
appointmentDetails: {
|
|
...getDefaultTestData().appointmentDetails!,
|
|
shopAddress: "6826 Sawmill Rd, Columbus, OH 43235"
|
|
},
|
|
|
|
// Override payment details
|
|
paymentDetails: PaymentData.getDefaultAfterpayDetails()
|
|
}
|
|
|
|
const cashReplaceGlassAddressLookupInshopAfterPayTests: TestCase[] = [];
|
|
|
|
const tc = new TestCase({
|
|
name: `CashReplaceGlassAddressLookupInshopAfterPay`,
|
|
tags: ['@E2E','@CashReplaceGlassAddressLookupInshopAfterPay', '@test_report', '@CASH'],
|
|
testData: cashReplaceGlassAddressLookupInshopAfterPayData
|
|
}, undefined, 'CashReplaceGlassAddressLookupInshopAfterPay');
|
|
cashReplaceGlassAddressLookupInshopAfterPayTests.push(tc);
|
|
|
|
export default cashReplaceGlassAddressLookupInshopAfterPayTests; |