Fix TPA repair flow
This commit is contained in:
parent
f2a3b09102
commit
8e419769de
4 changed files with 13 additions and 15 deletions
|
|
@ -45,4 +45,5 @@ export interface ITestData {
|
||||||
isMoldingQuestion: boolean,
|
isMoldingQuestion: boolean,
|
||||||
isNonServiceable: boolean, // For the flow where a a non-serviceable vehicle is selected on lookup
|
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
|
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,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ export class TpaSubmitPage extends BasePage {
|
||||||
async validateDeductible(claimDetails: IClaimDetails, isUnverifiedPolicyAfterVehicleLookup: boolean, isPolicyFound: boolean) {
|
async validateDeductible(claimDetails: IClaimDetails, isUnverifiedPolicyAfterVehicleLookup: boolean, isPolicyFound: boolean) {
|
||||||
const deductibleTextValue = await this.deductible.textContent();
|
const deductibleTextValue = await this.deductible.textContent();
|
||||||
|
|
||||||
|
await expect(this.deductible).toBeVisible();
|
||||||
|
|
||||||
if (claimDetails.policyDeductible !== -1 && !isUnverifiedPolicyAfterVehicleLookup) {
|
if (claimDetails.policyDeductible !== -1 && !isUnverifiedPolicyAfterVehicleLookup) {
|
||||||
expect.soft(deductibleTextValue).toContain(claimDetails.policyDeductible.toLocaleString());
|
expect.soft(deductibleTextValue).toContain(claimDetails.policyDeductible.toLocaleString());
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
|
|
@ -379,7 +379,7 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
||||||
isRecalWarning, servicePackage, hasOemEndorsement, hasStateLawPopup, otherVehiclesOnPolicy, isUseVehicleFromAddressLookup,
|
isRecalWarning, servicePackage, hasOemEndorsement, hasStateLawPopup, otherVehiclesOnPolicy, isUseVehicleFromAddressLookup,
|
||||||
isSeparateApptsWarning, vehiclePartQuestions, editVehicleDetails, isAddressLookupValidations,
|
isSeparateApptsWarning, vehiclePartQuestions, editVehicleDetails, isAddressLookupValidations,
|
||||||
hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy,
|
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
|
let { isPolicyFound } = testCase.testData; // Allow isPolicyFound to be re-assigned
|
||||||
|
|
||||||
|
|
@ -788,6 +788,13 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
||||||
await providerPreferencePage.scheduleTPAWithoutAdas();
|
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
|
// TPA Flow
|
||||||
if (!isPolicyFound || !(isItac || isNoComp) || isUnverifiedPolicyAfterVehicleLookup) {
|
if (!isPolicyFound || !(isItac || isNoComp) || isUnverifiedPolicyAfterVehicleLookup) {
|
||||||
|
|
|
||||||
|
|
@ -33,20 +33,8 @@ const advancedScenario0008Data: Partial<ITestData> = {
|
||||||
isDuplicateClaim: false,
|
isDuplicateClaim: false,
|
||||||
isPolicyFound: true,
|
isPolicyFound: true,
|
||||||
isNoComp: false,
|
isNoComp: false,
|
||||||
hasStateLawPopup: true,
|
hasStateLawPopup: false,
|
||||||
endorsements: undefined,
|
isRepairTPA: true,
|
||||||
vehiclePartQuestions: [
|
|
||||||
// {
|
|
||||||
// partQuestionType: PartQuestionType.WindshieldColor,
|
|
||||||
// isOnPage: true,
|
|
||||||
// optionToSelect: 'Green Tint'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// partQuestionType: PartQuestionType.PassengerRearColor,
|
|
||||||
// isOnPage: true,
|
|
||||||
// optionToSelect: 'Green Tint'
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
isSafelite: false,
|
isSafelite: false,
|
||||||
servicePackage: faker.helpers.enumValue(ServicePackage),
|
servicePackage: faker.helpers.enumValue(ServicePackage),
|
||||||
customerDetails: customerDetails,
|
customerDetails: customerDetails,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue