Adds a new environment variable to skip content site checks, improving test environment flexibility. Improves the "nextPage" function in BasePage to handle loader elements and button states more reliably. Adds support for selecting loss location in CCPolicyInfoPage to reflect claim details accurately. Updates assertion methods to use Soft assertions for smoother test execution. Adds a new test case "InsuranceMeemicNearSchoolVerified" to expand test coverage.
73 lines
No EOL
2.3 KiB
TypeScript
73 lines
No EOL
2.3 KiB
TypeScript
//Imports here
|
|
import { ITestData } from 'framework/TestData'
|
|
import { ServiceLocation, DamageType, Flow, PartQuestionType } from 'safelite-playwright-core';
|
|
import { PaymentMethod } from "framework/localTypes/Enums";
|
|
import { ITestCase } from '../framework/Typedefs'
|
|
import { VehicleLookupType } from 'safelite-playwright-core';
|
|
import { getDefaultTestData, setFakerSeedFromTestName } from 'safelite-playwright-core';
|
|
|
|
// Seed for consistent test data generation
|
|
setFakerSeedFromTestName("InsuranceMeemicNearSchoolVerified");
|
|
|
|
// Now get the test data with the seeded faker
|
|
const insuranceMeemicNearSchoolVerifiedData: Partial<ITestData> = {
|
|
...getDefaultTestData(),
|
|
|
|
paymentMethod: PaymentMethod.Insurance,
|
|
|
|
isDuplicateClaim: false,
|
|
isPolicyFound: true,
|
|
isUseVehicleOnPolicy: true,
|
|
isRecalVehicle: false,
|
|
|
|
customerDetails: {
|
|
...getDefaultTestData().customerDetails!,
|
|
address: {
|
|
...getDefaultTestData().customerDetails!.address,
|
|
postalCode: '48382'
|
|
}
|
|
},
|
|
|
|
claimDetails: {
|
|
client: 'Meemic',
|
|
policyNumber: 'Mock427352LD',
|
|
policyDeductible: 0,
|
|
damageDate: new Date().toLocaleDateString('en-US', {month: '2-digit', day: '2-digit', year: 'numeric'}),
|
|
damageCause: DamageType.Rock,
|
|
lossLocation: LossLocation.School
|
|
},
|
|
|
|
vehicleDetails: {
|
|
...getDefaultTestData().vehicleDetails!,
|
|
year: '2015',
|
|
make: 'Jeep',
|
|
model: 'Wrangler',
|
|
style: '4 door utility',
|
|
vehicleLookupType: VehicleLookupType.Zip,
|
|
},
|
|
|
|
appointmentDetails: {
|
|
serviceLocation: ServiceLocation.InShop,
|
|
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate,
|
|
shopAddress: "3451 Washtenaw Ave, Ann Arbor, MI 48104"
|
|
},
|
|
|
|
partQuestions: [
|
|
{
|
|
partQuestionType: PartQuestionType.GeneralQuestion1,
|
|
isOnPage: true,
|
|
optionToSelect: 'No'
|
|
},
|
|
]
|
|
};
|
|
|
|
const insuranceMeemicNearSchoolVerifiedTests: ITestCase[] = [];
|
|
|
|
const tc = {
|
|
name: `InsuranceMeemicNearSchoolVerified`,
|
|
tags: ['@E2E', '@InsuranceMeemicNearSchool', '@test_report', '@Insurance'],
|
|
testData: insuranceMeemicNearSchoolVerifiedData
|
|
};
|
|
insuranceMeemicNearSchoolVerifiedTests.push(tc);
|
|
|
|
export default insuranceMeemicNearSchoolVerifiedTests; |