Fix TPA repair flow

This commit is contained in:
JennyNou 2026-04-14 10:09:52 -04:00
parent f2a3b09102
commit 8e419769de
4 changed files with 13 additions and 15 deletions

View file

@ -45,4 +45,5 @@ export interface ITestData {
isMoldingQuestion: boolean,
isNonServiceable: boolean, // For the flow where a a non-serviceable vehicle is selected on lookup
isNonServiceableVin: boolean, // For the flow where a serviceable vehicle is selected on lookup, but then the VIN of a non-serviceable vehicle is entered
isRepairTPA: boolean,
}

View file

@ -24,6 +24,8 @@ export class TpaSubmitPage extends BasePage {
async validateDeductible(claimDetails: IClaimDetails, isUnverifiedPolicyAfterVehicleLookup: boolean, isPolicyFound: boolean) {
const deductibleTextValue = await this.deductible.textContent();
await expect(this.deductible).toBeVisible();
if (claimDetails.policyDeductible !== -1 && !isUnverifiedPolicyAfterVehicleLookup) {
expect.soft(deductibleTextValue).toContain(claimDetails.policyDeductible.toLocaleString());
} else

View file

@ -379,7 +379,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
isRecalWarning, servicePackage, hasOemEndorsement, hasStateLawPopup, otherVehiclesOnPolicy, isUseVehicleFromAddressLookup,
isSeparateApptsWarning, vehiclePartQuestions, editVehicleDetails, isAddressLookupValidations,
hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy,
isVehicleLookupValidations, isMoldingQuestion, isNonServiceable, isNonServiceableVin, isRecalVehicle, isCanSafeliteRecalibrate } = testCase.testData;
isVehicleLookupValidations, isMoldingQuestion, isNonServiceable, isNonServiceableVin, isRecalVehicle, isCanSafeliteRecalibrate, isRepairTPA } = testCase.testData;
let { isPolicyFound } = testCase.testData; // Allow isPolicyFound to be re-assigned
@ -788,6 +788,13 @@ async function runWorkflow(page: Page, testCase: TestCase) {
await providerPreferencePage.scheduleTPAWithoutAdas();
});
}
if (!isSafelite && isRepairTPA) {
await test.step('ProviderPreferencePage >> Schedule repair with TPA without Adas', async () => {
await providerPreferencePage.validateURL(providerPreferencePage.issPageValue);
await providerPreferencePage.scheduleTPAWithoutAdas();
});
}
}
// TPA Flow
if (!isPolicyFound || !(isItac || isNoComp) || isUnverifiedPolicyAfterVehicleLookup) {

View file

@ -33,20 +33,8 @@ const advancedScenario0008Data: Partial<ITestData> = {
isDuplicateClaim: false,
isPolicyFound: true,
isNoComp: false,
hasStateLawPopup: true,
endorsements: undefined,
vehiclePartQuestions: [
// {
// partQuestionType: PartQuestionType.WindshieldColor,
// isOnPage: true,
// optionToSelect: 'Green Tint'
// },
// {
// partQuestionType: PartQuestionType.PassengerRearColor,
// isOnPage: true,
// optionToSelect: 'Green Tint'
// },
],
hasStateLawPopup: false,
isRepairTPA: true,
isSafelite: false,
servicePackage: faker.helpers.enumValue(ServicePackage),
customerDetails: customerDetails,