Merge remote-tracking branch 'origin/CASH-631' into CASH-631
This commit is contained in:
commit
e4e49ac529
3 changed files with 94 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ export class CoverageStatementPage extends InsuranceBasePage {
|
||||||
readonly cancelMyClaimButton: Locator;
|
readonly cancelMyClaimButton: Locator;
|
||||||
readonly deductibleAmount: Locator;
|
readonly deductibleAmount: Locator;
|
||||||
readonly verifyingCoverageText: Locator;
|
readonly verifyingCoverageText: Locator;
|
||||||
|
readonly noCompText: Locator;
|
||||||
readonly continueButton: Locator; // For ITAC/NoComp
|
readonly continueButton: Locator; // For ITAC/NoComp
|
||||||
url = process.env['BASE_URL']! + '/FixMyGlass/CoverageStatement.aspx';
|
url = process.env['BASE_URL']! + '/FixMyGlass/CoverageStatement.aspx';
|
||||||
|
|
||||||
|
|
@ -20,6 +21,7 @@ export class CoverageStatementPage extends InsuranceBasePage {
|
||||||
this.cancelMyClaimButton = this.page.getByText('Cancel my claim');
|
this.cancelMyClaimButton = this.page.getByText('Cancel my claim');
|
||||||
this.deductibleAmount = this.page.getByRole('heading', { name: '$' }).locator('span');
|
this.deductibleAmount = this.page.getByRole('heading', { name: '$' }).locator('span');
|
||||||
this.verifyingCoverageText = this.page.getByRole('heading', { name: 'We\'re verifying your coverage' });
|
this.verifyingCoverageText = this.page.getByRole('heading', { name: 'We\'re verifying your coverage' });
|
||||||
|
this.noCompText = this.page.getByRole('heading', { name: 'Your policy doesn\'t cover this service' });
|
||||||
this.continueButton = page.getByRole('button', { name: 'Continue' });
|
this.continueButton = page.getByRole('button', { name: 'Continue' });
|
||||||
// this.validateURL(this.url);
|
// this.validateURL(this.url);
|
||||||
}
|
}
|
||||||
|
|
@ -54,7 +56,7 @@ export class CoverageStatementPage extends InsuranceBasePage {
|
||||||
await expect(deductibleElement).toContainText(`$${expectedDeductibleRegex}`);
|
await expect(deductibleElement).toContainText(`$${expectedDeductibleRegex}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await unverifiedDeductibleElement.isVisible()) {
|
if (await unverifiedDeductibleElement.isVisible() || await this.noCompText.isVisible()) {
|
||||||
// Click on continue button if unverified header is visible
|
// Click on continue button if unverified header is visible
|
||||||
await this.continueButton.click();
|
await this.continueButton.click();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ import insuranceAcuityPaypalTests from "./InsuranceAcuityPaypal";
|
||||||
import insuranceITAC21stCenturyTests from "./InsuranceITAC21stCentury";
|
import insuranceITAC21stCenturyTests from "./InsuranceITAC21stCentury";
|
||||||
import insuranceGeicoTests from "./InsuranceGeico";
|
import insuranceGeicoTests from "./InsuranceGeico";
|
||||||
import insuranceITACOptimizedPriceValidationAllStateTests from "./InsuranceITACOptimizedPriceValidationAllState";
|
import insuranceITACOptimizedPriceValidationAllStateTests from "./InsuranceITACOptimizedPriceValidationAllState";
|
||||||
|
import insuranceNoCompProgressiveTests from "./InsuranceNoCompProgressive";
|
||||||
import cashRepairInShopAfterPayTests from "./CashRepairInShopAfterPay";
|
import cashRepairInShopAfterPayTests from "./CashRepairInShopAfterPay";
|
||||||
import cashRepairInShopPayPalTests from "./CashRepairInShopPayPal";
|
import cashRepairInShopPayPalTests from "./CashRepairInShopPayPal";
|
||||||
import cashReplaceMultiSlidingGlassDropoffTests from "./CashReplaceMultiSlidingGlassDropoff";
|
import cashReplaceMultiSlidingGlassDropoffTests from "./CashReplaceMultiSlidingGlassDropoff";
|
||||||
|
|
@ -70,6 +71,7 @@ const allStandardTests = [
|
||||||
{name: "CashReplaceWiperPromoInshop", tests: cashReplaceWiperPromoInShopTests},
|
{name: "CashReplaceWiperPromoInshop", tests: cashReplaceWiperPromoInShopTests},
|
||||||
{name: "InsuranceAcuityPaypal", tests: insuranceAcuityPaypalTests},
|
{name: "InsuranceAcuityPaypal", tests: insuranceAcuityPaypalTests},
|
||||||
{name: "InsuranceITAC21stCentury", tests: insuranceITAC21stCenturyTests},
|
{name: "InsuranceITAC21stCentury", tests: insuranceITAC21stCenturyTests},
|
||||||
|
{name: "InsuranceNoCompProgressive", tests: insuranceNoCompProgressiveTests},
|
||||||
{name: "CashReplaceSwitchToInsuranceProgressiveNoComp", tests: cashReplaceSwitchToInsuranceProgressiveNoCompTests},
|
{name: "CashReplaceSwitchToInsuranceProgressiveNoComp", tests: cashReplaceSwitchToInsuranceProgressiveNoCompTests},
|
||||||
{name: "InsuranceBigTruckVerified", tests: insuranceBigTruckVerifiedTests},
|
{name: "InsuranceBigTruckVerified", tests: insuranceBigTruckVerifiedTests},
|
||||||
{name: "InsuranceUnverified", tests: insuranceUnverifiedTests},
|
{name: "InsuranceUnverified", tests: insuranceUnverifiedTests},
|
||||||
|
|
|
||||||
89
playwright-tests/tests/InsuranceNoCompProgressive.ts
Normal file
89
playwright-tests/tests/InsuranceNoCompProgressive.ts
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
//Imports here
|
||||||
|
import { ITestData } from "@business-logic/types/ITestData"
|
||||||
|
import { PaymentMethod, AppointmentType, DamageType, PaymentType, PartQuestionType} 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("InsuranceNoCompProgressive");
|
||||||
|
|
||||||
|
// Now get the test data with the seeded faker
|
||||||
|
const insuranceNoCompProgressiveData: Partial<ITestData> = {
|
||||||
|
...getDefaultTestData(), // Get default data with current seed
|
||||||
|
|
||||||
|
// Key feature: Insurance flow with GEICO
|
||||||
|
paymentMethod: PaymentMethod.Insurance,
|
||||||
|
|
||||||
|
// Insurance claim flags
|
||||||
|
isDuplicateClaim: true,
|
||||||
|
isPolicyFound: true,
|
||||||
|
isUseVehicleOnPolicy: true,
|
||||||
|
isHeavyTruck: false,
|
||||||
|
isPolicyDriver: true,
|
||||||
|
isRecalVehicle: true,
|
||||||
|
|
||||||
|
// Override customer details with specific name and California location
|
||||||
|
customerDetails: {
|
||||||
|
...getDefaultTestData().customerDetails!,
|
||||||
|
firstName: 'SHERI',
|
||||||
|
lastName: 'SCHATZ',
|
||||||
|
address: {
|
||||||
|
...getDefaultTestData().customerDetails!.address,
|
||||||
|
city: 'Slidell',
|
||||||
|
state: 'Louisiana',
|
||||||
|
postalCode: '70458'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// Insurance claim details
|
||||||
|
claimDetails: {
|
||||||
|
client: 'Progressive',
|
||||||
|
policyNumber: 'Mock495646B',
|
||||||
|
policyDeductible: 1722.20,
|
||||||
|
policyZip: '70458',
|
||||||
|
damageDate: new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString('en-US', {month: '2-digit', day: '2-digit', year: 'numeric'}),
|
||||||
|
damageCause: DamageType.Rock
|
||||||
|
},
|
||||||
|
|
||||||
|
// Hyundai vehicle details with VIN lookup
|
||||||
|
vehicleDetails: {
|
||||||
|
...getDefaultTestData().vehicleDetails!,
|
||||||
|
year: '2015',
|
||||||
|
make: 'Acura',
|
||||||
|
model: 'MDX',
|
||||||
|
style: '4 door utility',
|
||||||
|
vehicleLookupType: VehicleLookupType.Zip,
|
||||||
|
},
|
||||||
|
|
||||||
|
// Part questions related to recalibration
|
||||||
|
partQuestions: [
|
||||||
|
{
|
||||||
|
partQuestionType: PartQuestionType.GeneralQuestion1,
|
||||||
|
isOnPage: true,
|
||||||
|
optionToSelect: 'Yes'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
// Override for in-shop appointment
|
||||||
|
appointmentDetails: {
|
||||||
|
serviceLocation: AppointmentType.InShop,
|
||||||
|
shopAddress: '56705 Garrett Road, Slidell, LA 70458',
|
||||||
|
appointmentDate: getDefaultTestData().appointmentDetails?.appointmentDate
|
||||||
|
},
|
||||||
|
|
||||||
|
// Override payment details (empty because we skip payment method page in insurance flow)
|
||||||
|
paymentDetails: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
const insuranceNoCompProgressiveTests: TestCase[] = [];
|
||||||
|
|
||||||
|
const tc = new TestCase({
|
||||||
|
name: `InsuranceNoCompProgressive`,
|
||||||
|
tags: ['@E2E','@InsuranceNoCompProgressive', '@test_report', '@Insurance'],
|
||||||
|
testData: insuranceNoCompProgressiveData
|
||||||
|
}, undefined, 'InsuranceBigTruckVerified');
|
||||||
|
insuranceNoCompProgressiveTests.push(tc);
|
||||||
|
|
||||||
|
export default insuranceNoCompProgressiveTests;
|
||||||
Loading…
Reference in a new issue