diff --git a/playwright-tests/pages/BailoutPage.ts b/playwright-tests/pages/BailoutPage.ts index dbbfcf67..d387b15b 100644 --- a/playwright-tests/pages/BailoutPage.ts +++ b/playwright-tests/pages/BailoutPage.ts @@ -9,7 +9,7 @@ export class BailoutPage extends BasePage { readonly phoneNumberTextBox: Locator; readonly emailAddressTextBox: Locator; - url = process.env['BASE_URL']! + '/?issPage=bailout-page'; + issPageValue = 'bailout-page'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/BasePage.ts b/playwright-tests/pages/BasePage.ts index 0b3c8b0a..7ab18f94 100644 --- a/playwright-tests/pages/BasePage.ts +++ b/playwright-tests/pages/BasePage.ts @@ -115,9 +115,9 @@ export class BasePage { } - async validateURL(url: string) { + async validateURL(issPageValue: string) { - await test.step(`Validating URL:${url}`, async () => { + await test.step(`Validating page value:${issPageValue}`, async () => { let failCount = 0; /* We can't assume that the URL has already changed when we get here, but the point of this @@ -128,7 +128,7 @@ export class BasePage { await this.page.waitForTimeout(1000); const currentUrl = this.page.url(); console.log(`Current URL: ${currentUrl}`) - if(currentUrl == url) + if(currentUrl.includes(issPageValue)) break; else { failCount++; diff --git a/playwright-tests/pages/CapabilityQuestionsPage.ts b/playwright-tests/pages/CapabilityQuestionsPage.ts index 57ec7745..13fab9f2 100644 --- a/playwright-tests/pages/CapabilityQuestionsPage.ts +++ b/playwright-tests/pages/CapabilityQuestionsPage.ts @@ -2,7 +2,7 @@ import { Page } from "@playwright/test"; import { PartQuestionsPage } from "./PartQuestionsPage"; export default class CapabilityQuestionsPage extends PartQuestionsPage { - url = process.env['BASE_URL']! + '/?issPage=capability-questions'; + issPageValue = 'capability-questions'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/ContactConfirmationPage.ts b/playwright-tests/pages/ContactConfirmationPage.ts index c3b7bfc9..cd9b370f 100644 --- a/playwright-tests/pages/ContactConfirmationPage.ts +++ b/playwright-tests/pages/ContactConfirmationPage.ts @@ -6,7 +6,7 @@ export class ContactConfirmationPage extends BasePage { readonly page: Page; readonly ConfirmMessageLabel: Locator; - url = process.env['BASE_URL']! + '/?issPage=contact-confirmation'; + issPageValue = 'contact-confirmation'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/ContactDetailsPage.ts b/playwright-tests/pages/ContactDetailsPage.ts index 731ccf66..a942a12e 100644 --- a/playwright-tests/pages/ContactDetailsPage.ts +++ b/playwright-tests/pages/ContactDetailsPage.ts @@ -4,7 +4,7 @@ import { ICustomerDetails } from '@business-logic/types/CustomerDetails'; export class ContactDetailsPage extends BasePage { readonly page: Page; - url = process.env['BASE_URL']! + '/?issPage=contact-details'; + issPageValue = 'contact-details'; // Contact details form // TODO: Check if we can consolidate diff --git a/playwright-tests/pages/CoverageStatementPage.ts b/playwright-tests/pages/CoverageStatementPage.ts index 147bb19f..63246b42 100644 --- a/playwright-tests/pages/CoverageStatementPage.ts +++ b/playwright-tests/pages/CoverageStatementPage.ts @@ -8,7 +8,7 @@ export class CoverageStatementPage extends BasePage { readonly deductibleAmount: Locator; readonly verfiyingCoverageText: Locator; readonly continueToScheduleButton: Locator; // For ITAC/NoComp - url = process.env['BASE_URL']! + '/?issPage=coverage-statement'; + issPageValue = 'coverage-statement'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/DuplicateCheckPage.ts b/playwright-tests/pages/DuplicateCheckPage.ts index 10518b3f..c117db29 100644 --- a/playwright-tests/pages/DuplicateCheckPage.ts +++ b/playwright-tests/pages/DuplicateCheckPage.ts @@ -4,7 +4,7 @@ import { BasePage } from './BasePage'; export class DuplicateCheckPage extends BasePage { readonly page: Page; readonly newClaimButton: Locator; - url = process.env['BASE_URL']! + '/?issPage=duplicate-check'; + issPageValue = 'duplicate-check'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/EndorsementsPage.ts b/playwright-tests/pages/EndorsementsPage.ts index 1e86773f..8e154119 100644 --- a/playwright-tests/pages/EndorsementsPage.ts +++ b/playwright-tests/pages/EndorsementsPage.ts @@ -7,7 +7,7 @@ export class EndorsementsPage extends BasePage { readonly page: Page; readonly educatorYesButton: Locator; readonly educatorNoButton: Locator; - url = process.env['BASE_URL']! + '/?issPage=policy-endorsements'; + issPageValue = 'policy-endorsements'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/MoldingQuestionsPage.ts b/playwright-tests/pages/MoldingQuestionsPage.ts index ecb7fe7d..f8f6a555 100644 --- a/playwright-tests/pages/MoldingQuestionsPage.ts +++ b/playwright-tests/pages/MoldingQuestionsPage.ts @@ -3,7 +3,7 @@ import { BasePage } from './BasePage'; export class MoldingQuestionsPage extends BasePage { readonly page: Page; - url = process.env['BASE_URL']! + '/?issPage=part-questions'; + issPageValue = 'part-questions'; readonly yesButton: Locator; constructor(page: Page) { diff --git a/playwright-tests/pages/OrderConfirmationPage.ts b/playwright-tests/pages/OrderConfirmationPage.ts index 6f0ed1dc..2a4d6104 100644 --- a/playwright-tests/pages/OrderConfirmationPage.ts +++ b/playwright-tests/pages/OrderConfirmationPage.ts @@ -15,7 +15,7 @@ export class OrderConfirmationPage extends BasePage { readonly subtotalText: Locator; readonly finalAmountDue: Locator; readonly cartServicePackageText: Locator; - url = process.env['BASE_URL']! + '/?issPage=order-confirmation'; + issPageValue = 'order-confirmation'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/PartQuestionsPage.ts b/playwright-tests/pages/PartQuestionsPage.ts index 16f63ceb..1591b132 100644 --- a/playwright-tests/pages/PartQuestionsPage.ts +++ b/playwright-tests/pages/PartQuestionsPage.ts @@ -4,7 +4,7 @@ import { IPartQuestion } from '@business-logic/types/CustomerDetails'; export class PartQuestionsPage extends BasePage { readonly page: Page; - url = process.env['BASE_URL']! + '/?issPage=part-questions'; + issPageValue = 'part-questions'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/PaymentMethodPage.ts b/playwright-tests/pages/PaymentMethodPage.ts index bb4b3ecc..57d560be 100644 --- a/playwright-tests/pages/PaymentMethodPage.ts +++ b/playwright-tests/pages/PaymentMethodPage.ts @@ -15,7 +15,7 @@ export class PaymentMethodPage extends BasePage { readonly paypalButton: Locator; readonly paymentPage: PaymentPage; readonly paypalPage: PaypalPage; - url = process.env['BASE_URL']! + '/?issPage=payment-method'; + issPageValue = 'payment-method'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/PaymentPage.ts b/playwright-tests/pages/PaymentPage.ts index 1c2334c9..51942f0e 100644 --- a/playwright-tests/pages/PaymentPage.ts +++ b/playwright-tests/pages/PaymentPage.ts @@ -13,7 +13,7 @@ export class PaymentPage extends BasePage { readonly stateDropDown: Locator; readonly billingZipTextField: Locator; readonly submitPaymentButton: Locator; - url = process.env['BASE_URL']! + '/?issPage=payment-page'; + issPageValue = 'payment-page'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/PolicyHolderDetailsPage.ts b/playwright-tests/pages/PolicyHolderDetailsPage.ts index f9f8d9a7..47f11031 100644 --- a/playwright-tests/pages/PolicyHolderDetailsPage.ts +++ b/playwright-tests/pages/PolicyHolderDetailsPage.ts @@ -6,7 +6,7 @@ import { AddressForm } from './forms/AddressForm'; export class PolicyHolderDetailsPage extends BasePage { readonly page: Page; readonly addressForm: AddressForm; - readonly url = process.env['BASE_URL']! + '/?issPage=policy-holder-details'; + readonly issPageValue = 'policy-holder-details'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/PolicyVehiclesPage.ts b/playwright-tests/pages/PolicyVehiclesPage.ts index 0cd05b41..98b54217 100644 --- a/playwright-tests/pages/PolicyVehiclesPage.ts +++ b/playwright-tests/pages/PolicyVehiclesPage.ts @@ -4,7 +4,7 @@ import { IVehicleDetails } from '@business-logic/types/CustomerDetails'; export class PolicyVehiclesPage extends BasePage { readonly page: Page; - url = process.env['BASE_URL']! + '/?issPage=policy-vehicles'; + issPageValue = 'policy-vehicles'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/ProviderPreferencePage.ts b/playwright-tests/pages/ProviderPreferencePage.ts index 4bcfef51..7b6a53bc 100644 --- a/playwright-tests/pages/ProviderPreferencePage.ts +++ b/playwright-tests/pages/ProviderPreferencePage.ts @@ -9,7 +9,7 @@ export class ProviderPreferencePage extends BasePage { readonly gotItButton: Locator; readonly acknowledgeCheckbox: Locator; readonly stateLawModalHeading: Locator; - url = process.env['BASE_URL']! + '/?issPage=provider-preference'; + issPageValue = 'provider-preference'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/SchedulePage.ts b/playwright-tests/pages/SchedulePage.ts index 4003bcb9..0bd340dc 100644 --- a/playwright-tests/pages/SchedulePage.ts +++ b/playwright-tests/pages/SchedulePage.ts @@ -6,7 +6,7 @@ import { ServiceLocation } from '@business-logic/types/Enums'; export class SchedulePage extends BasePage { readonly page: Page; - url = process.env['BASE_URL']! + '/?issPage=schedule-page'; + issPageValue = 'schedule-page'; readonly firstAvailableDate: Locator; readonly firstAvailableTime: Locator; readonly modalContinueButton: Locator; diff --git a/playwright-tests/pages/ServiceLocationPage.ts b/playwright-tests/pages/ServiceLocationPage.ts index 4b855602..d84f87df 100644 --- a/playwright-tests/pages/ServiceLocationPage.ts +++ b/playwright-tests/pages/ServiceLocationPage.ts @@ -36,7 +36,7 @@ export class ServiceLocationPage extends BasePage { readonly vehicleProtectedNoButton: Locator; readonly saveAddressButton: Locator; - url = process.env['BASE_URL']! + '/?issPage=service-location'; + issPageValue = 'service-location'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/ServicePackagesPage.ts b/playwright-tests/pages/ServicePackagesPage.ts index e2b8ba67..9e8dd866 100644 --- a/playwright-tests/pages/ServicePackagesPage.ts +++ b/playwright-tests/pages/ServicePackagesPage.ts @@ -7,7 +7,7 @@ export class ServicePackagesPage extends BasePage { readonly standardPackageButton: Locator; readonly premiumPackageButton: Locator; readonly glassOnlyButton: Locator; - url = process.env['BASE_URL']! + '/?issPage=service-packages'; + issPageValue = 'service-packages'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/TpaConfirmationPage.ts b/playwright-tests/pages/TpaConfirmationPage.ts index 2dbb8b19..fb0460e2 100644 --- a/playwright-tests/pages/TpaConfirmationPage.ts +++ b/playwright-tests/pages/TpaConfirmationPage.ts @@ -4,7 +4,7 @@ import { BasePage } from './BasePage'; export class TpaConfirmationPage extends BasePage { readonly page: Page; readonly successMessage: Locator; - readonly url = process.env['BASE_URL']! + '/?issPage=tpa-confirmation'; + readonly issPageValue = 'tpa-confirmation'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/TpaSearchPage.ts b/playwright-tests/pages/TpaSearchPage.ts index 259f43f7..8f4b8639 100644 --- a/playwright-tests/pages/TpaSearchPage.ts +++ b/playwright-tests/pages/TpaSearchPage.ts @@ -5,7 +5,7 @@ export class TpaSearchPage extends BasePage { readonly page: Page; readonly firstLocationButton: Locator; readonly doNotSeeMyShopButton: Locator; - url = process.env['BASE_URL']! + '/?issPage=tpa-search'; + issPageValue = 'tpa-search'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/TpaSubmitPage.ts b/playwright-tests/pages/TpaSubmitPage.ts index bece6703..e563af7a 100644 --- a/playwright-tests/pages/TpaSubmitPage.ts +++ b/playwright-tests/pages/TpaSubmitPage.ts @@ -4,7 +4,7 @@ import { BasePage } from './BasePage'; export class TpaSubmitPage extends BasePage { readonly page: Page; readonly deductible: Locator; - url = process.env['BASE_URL']! + '/?issPage=tpa-submit'; + issPageValue = 'tpa-submit'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/VehicleDamagePage.ts b/playwright-tests/pages/VehicleDamagePage.ts index 58ec7515..a8fc147a 100644 --- a/playwright-tests/pages/VehicleDamagePage.ts +++ b/playwright-tests/pages/VehicleDamagePage.ts @@ -22,7 +22,7 @@ export class VehicleDamagePage extends BasePage { readonly rearWindowChkBox: Locator; readonly separateApptsWarning: Locator; readonly editVehicleButton: Locator; - url = process.env['BASE_URL']! + '/?issPage=vehicle-damage'; + issPageValue = 'vehicle-damage'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/VehicleLookupAddressPage.ts b/playwright-tests/pages/VehicleLookupAddressPage.ts index 33b72cfd..9f758323 100644 --- a/playwright-tests/pages/VehicleLookupAddressPage.ts +++ b/playwright-tests/pages/VehicleLookupAddressPage.ts @@ -8,7 +8,7 @@ export class VehicleLookupAddressPage extends BasePage { readonly page: Page; readonly addressForm: AddressForm; readonly vehicleSelectionForm: VehicleSelectionForm; - url = process.env['BASE_URL']! + '/?issPage=address-lookup'; + issPageValue = 'address-lookup'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/VehicleLookupLicensePage.ts b/playwright-tests/pages/VehicleLookupLicensePage.ts index 9dba3fd1..433ed849 100644 --- a/playwright-tests/pages/VehicleLookupLicensePage.ts +++ b/playwright-tests/pages/VehicleLookupLicensePage.ts @@ -8,7 +8,7 @@ export class VehicleLookupLicensePage extends BasePage { readonly licensePlateStateDrpDwn: Locator; readonly plateNoMatchError: Locator; readonly plateMismatchAlert: Locator; - url = process.env['BASE_URL']! + '/?issPage='; // TODO: Input correct URL + issPageValue = 'license-plate-lookup'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/VehicleLookupPage.ts b/playwright-tests/pages/VehicleLookupPage.ts index c2bd2046..1dab391e 100644 --- a/playwright-tests/pages/VehicleLookupPage.ts +++ b/playwright-tests/pages/VehicleLookupPage.ts @@ -14,7 +14,7 @@ export class VehicleLookupPage extends BasePage { readonly vinLookupPage: VinLookupPage; readonly vehicleLookupAddressPage: VehicleLookupAddressPage; readonly vehicleLookupLicensePage: VehicleLookupLicensePage; - url = process.env['BASE_URL']! + '/?issPage=vehicle-lookup'; + issPageValue = 'vehicle-lookup'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/VehiclePartsPage.ts b/playwright-tests/pages/VehiclePartsPage.ts index 908a2542..9671b7f9 100644 --- a/playwright-tests/pages/VehiclePartsPage.ts +++ b/playwright-tests/pages/VehiclePartsPage.ts @@ -2,7 +2,7 @@ import { Page } from "@playwright/test"; import { PartQuestionsPage } from "./PartQuestionsPage"; export default class VehiclePartQuestionsPage extends PartQuestionsPage{ - url = process.env['BASE_URL']! + '/?issPage=vehicle-parts'; + issPageValue = 'vehicle-parts'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/VehicleSelectionPage.ts b/playwright-tests/pages/VehicleSelectionPage.ts index dc9a19d2..383f2aa3 100644 --- a/playwright-tests/pages/VehicleSelectionPage.ts +++ b/playwright-tests/pages/VehicleSelectionPage.ts @@ -9,7 +9,7 @@ export class VehicleSelectionPage extends BasePage { readonly modelDropdown: Locator; readonly styleDropdown: Locator; - url = process.env['BASE_URL']! + '/?issPage=vehicle-selection'; + issPageValue = 'vehicle-selection'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/VinLookupPage.ts b/playwright-tests/pages/VinLookupPage.ts index 2ef93ee4..69c1f846 100644 --- a/playwright-tests/pages/VinLookupPage.ts +++ b/playwright-tests/pages/VinLookupPage.ts @@ -6,7 +6,7 @@ export class VinLookupPage extends BasePage { readonly vinLookupTextBox: Locator; readonly lookupVinForMe: Locator; readonly vinMismatchAlert: Locator; - url = process.env['BASE_URL']! + '/?issPage=vin-lookup'; // TODO: Input correct URL + issPageValue = 'vin-lookup'; constructor(page: Page) { super(page); diff --git a/playwright-tests/pages/WelcomePage.ts b/playwright-tests/pages/WelcomePage.ts index 8002ca56..62dceee6 100644 --- a/playwright-tests/pages/WelcomePage.ts +++ b/playwright-tests/pages/WelcomePage.ts @@ -17,6 +17,7 @@ export class WelcomePage extends BasePage { readonly state: Locator; readonly cookieCloseButton: Locator; url = process.env['BASE_URL']! + '/?issPage=welcome-page'; + issPageValue = 'welcome-page'; constructor(page: Page) { super(page); diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 095b9053..5499792d 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -370,7 +370,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { // TODO: Dynamic for when we don't care if duplicate page appears await test.step('DuplicateCheckPage >> Start New Claim', async () => { - await duplicateCheckPage.validateURL(duplicateCheckPage.url); + await duplicateCheckPage.validateURL(duplicateCheckPage.issPageValue); await duplicateCheckPage.startNewClaim(); await duplicateCheckPage.nextPage(); }); @@ -378,7 +378,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (isPolicyFound) { await test.step('PolicyVehiclesPage >> Select vehicle', async () => { - await policyVehiclesPage.validateURL(policyVehiclesPage.url); + await policyVehiclesPage.validateURL(policyVehiclesPage.issPageValue); await policyVehiclesPage.logReferralNumber(); // Validate other vehicles on policy if (otherVehiclesOnPolicy && otherVehiclesOnPolicy.length > 0) { @@ -400,7 +400,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (isHeavyTruckVehicleBailout) { await test.step('BailoutPage >> Heavy Vehicle Bailout', async () => { - await bailoutPage.validateURL(bailoutPage.url); + await bailoutPage.validateURL(bailoutPage.issPageValue); await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.HeavyTruckVehicle); }); return; @@ -408,7 +408,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (hasEndorsements) { await test.step('EndorsementsPage >> Select Endorsements', async () => { - await endorsementsPage.validateURL(endorsementsPage.url); + await endorsementsPage.validateURL(endorsementsPage.issPageValue); await endorsementsPage.verifyEndorsements(endorsements); await endorsementsPage.selectEndorsements(endorsements); await endorsementsPage.nextPage(); @@ -418,7 +418,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { } else { await policyVehiclesPage.logReferralNumber(); await test.step('PolicyHolderDetailsPage >> Enter customer data', async () => { - await policyHolderDetailsPage.validateURL(policyHolderDetailsPage.url); + await policyHolderDetailsPage.validateURL(policyHolderDetailsPage.issPageValue); await policyHolderDetailsPage.fillCustomerDetails(customerDetails!); await policyHolderDetailsPage.nextPage(); }); @@ -428,14 +428,14 @@ async function runWorkflow(page: Page, testCase: TestCase) { } await test.step('VehicleDetailsPage >> Select Vehicle', async () => { - await vehicleSelectionPage.validateURL(vehicleSelectionPage.url); + await vehicleSelectionPage.validateURL(vehicleSelectionPage.issPageValue); await vehicleSelectionPage.selectVehicle(vehicleDetails!); await vehicleSelectionPage.nextPage(); }); if (isVehicleLookupBailout) { await test.step('BailoutPage >> Vehicle Lookup Bailout', async () => { - await bailoutPage.validateURL(bailoutPage.url); + await bailoutPage.validateURL(bailoutPage.issPageValue); await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.VehicleYMMSLookupError); }); return; @@ -443,7 +443,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (isHeavyTruckVehicleBailout) { await test.step('BailoutPage >> Heavy Vehicle Bailout', async () => { - await bailoutPage.validateURL(bailoutPage.url); + await bailoutPage.validateURL(bailoutPage.issPageValue); await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.HeavyTruckVehicle); }); return; @@ -454,13 +454,13 @@ async function runWorkflow(page: Page, testCase: TestCase) { isPolicyFound = false; // Flow proceeds as unverified testCase.testData.isPolicyFound = false; await test.step('VehicleDamagePage >> Click Edit Vehicle', async () => { - await vehicleDamagePage.validateURL(vehicleDamagePage.url); + await vehicleDamagePage.validateURL(vehicleDamagePage.issPageValue); await vehicleDamagePage.editVehicleButton.click(); }); await test.step('VehicleDetailsPage >> Select edited vehicle', async () => { await test.step('VehicleDetailsPage >> Select Vehicle', async () => { - await vehicleSelectionPage.validateURL(vehicleSelectionPage.url); + await vehicleSelectionPage.validateURL(vehicleSelectionPage.issPageValue); await vehicleSelectionPage.selectVehicle(editVehicleDetails); await vehicleSelectionPage.nextPage(); }); @@ -468,7 +468,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { } await test.step('VehicleDamagePage >> Select Damage', async () => { - await vehicleDamagePage.validateURL(vehicleDamagePage.url); + await vehicleDamagePage.validateURL(vehicleDamagePage.issPageValue); if (isSeparateApptsWarning) { await vehicleDamagePage.checkSeparateApptsWarning(); } @@ -478,17 +478,17 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (isPartsServiceErrorBailout) { await test.step('VehicleLookupPage >> Select Lookup Type', async () => { - await vehicleLookupPage.validateURL(vehicleLookupPage.url); + await vehicleLookupPage.validateURL(vehicleLookupPage.issPageValue); await vehicleLookupPage.vehicleLookup(vehicleDetails!); }); await test.step('VinLookupPage >> Lookup by VIN', async () => { - await vinLookupPage.validateURL(vinLookupPage.url); + await vinLookupPage.validateURL(vinLookupPage.issPageValue); await vinLookupPage.enterVin(vehicleDetails!.vin!); forceAPIError(page, '/parts/api/v1/parts') await vinLookupPage.nextPage(); }); await test.step('BailoutPage >> Parts Service Error Bailout', async () => { - await bailoutPage.validateURL(bailoutPage.url); + await bailoutPage.validateURL(bailoutPage.issPageValue); await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.PartsServiceError); return; }); @@ -499,13 +499,13 @@ async function runWorkflow(page: Page, testCase: TestCase) { await test.step('VehicleLookupPage >> Select Lookup Type' + vehicleDetails?.vehicleLookupType, async () => { - await vehicleLookupPage.validateURL(vehicleLookupPage.url); + await vehicleLookupPage.validateURL(vehicleLookupPage.issPageValue); await vehicleLookupPage.vehicleLookup(vehicleDetails!); }); if (isVehicleSelectBailout) { - await vinLookupPage.validateURL(vinLookupPage.url); + await vinLookupPage.validateURL(vinLookupPage.issPageValue); await test.step('Lookup vehicle >> By VIN-' + vehicleDetails!.vin!, async () => { await vinLookupPage.enterVin(vehicleDetails!.vin!); }); @@ -523,13 +523,13 @@ async function runWorkflow(page: Page, testCase: TestCase) { switch (vehicleDetails!.vehicleLookupType!) { case VehicleLookupType.Address: await test.step('VehicleLookupAddressPage >> Lookup by address: ' + customerDetails!.address.street, async () => { - await vehicleLookupAddressPage.validateURL(vehicleLookupAddressPage.url); + await vehicleLookupAddressPage.validateURL(vehicleLookupAddressPage.issPageValue); await vehicleLookupAddressPage.lookupVehicleByAddress(customerDetails!, vehicleDetails!); await vehicleLookupAddressPage.nextPage(); }); break; case VehicleLookupType.LicensePlateNumber: - await vehicleLookupLicensePage.validateURL(vehicleLookupLicensePage.url); + await vehicleLookupLicensePage.validateURL(vehicleLookupLicensePage.issPageValue); if (isVehicleLookupValidations) { await test.step('VehicleLookupLicensePage >> Lookup by license plate: ' + vehicleDetails!.licensePlateNumber, async () => { await vehicleLookupLicensePage.enterPlateDetails(vehicleDetails!, isVehicleLookupValidations); @@ -545,7 +545,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { break; case VehicleLookupType.Vin: await test.step('VinLookupPage >> Lookup by VIN: ' + vehicleDetails!.vin!, async () => { - await vinLookupPage.validateURL(vinLookupPage.url); + await vinLookupPage.validateURL(vinLookupPage.issPageValue); await vinLookupPage.enterVin(vehicleDetails!.vin!, isVehicleLookupValidations); await vinLookupPage.nextPage(); }); @@ -554,7 +554,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { } if (isMoldingQuestion) { await test.step('Molding Questions Page >> Select Yes', async () => { - await moldingQuestionsPage.validateURL(moldingQuestionsPage.url); + await moldingQuestionsPage.validateURL(moldingQuestionsPage.issPageValue); if (!moldingQuestionsPage) { console.error("moldingQuestionsPage is not initialized"); } @@ -563,28 +563,28 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); } if (capabilityQuestions && capabilityQuestions.length > 0) { - await capabilityQuestionsPage.validateURL(capabilityQuestionsPage.url); + await capabilityQuestionsPage.validateURL(capabilityQuestionsPage.issPageValue); await capabilityQuestionsPage.validatePartQuestions(capabilityQuestions); await capabilityQuestionsPage.selectPartQuestionResponses(capabilityQuestions); await capabilityQuestionsPage.nextPage(); } if (partQuestions && partQuestions.length > 0) { - await partQuestionsPage.validateURL(partQuestionsPage.url); + await partQuestionsPage.validateURL(partQuestionsPage.issPageValue); await partQuestionsPage.validatePartQuestions(partQuestions); await partQuestionsPage.selectPartQuestionResponses(partQuestions); await partQuestionsPage.nextPage(); } if (vehiclePartQuestions && vehiclePartQuestions.length > 0) { - await vehiclePartQuestionsPage.validateURL(vehiclePartQuestionsPage.url); + await vehiclePartQuestionsPage.validateURL(vehiclePartQuestionsPage.issPageValue); await vehiclePartQuestionsPage.validatePartQuestions(vehiclePartQuestions); await vehiclePartQuestionsPage.selectPartQuestionResponses(vehiclePartQuestions); await vehiclePartQuestionsPage.nextPage(); } await test.step('CoverageStatementPage >> Next page', async () => { - await coverageStatementPage.validateURL(coverageStatementPage.url); + await coverageStatementPage.validateURL(coverageStatementPage.issPageValue); // Confirm no coverage if (isPolicyFound && (isItac || isNoComp)) { await coverageStatementPage.continueToScheduleButton.click(); @@ -595,7 +595,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (hasStateLawPopup) { await test.step('ProviderPreferencePage >> Dismiss state law popup', async () => { - await providerPreferencePage.validateURL(providerPreferencePage.url); + await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); await providerPreferencePage.validateStateLawModalIsVisible(); await providerPreferencePage.gotItButton.click(); }); @@ -603,20 +603,20 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (!isPolicyFound || !(isItac || isNoComp)) { await test.step('ProviderPreferencePage >> Select Provider ' + isSafelite ? "Safelite" : "Other shops(Non-Safelite)", async () => { - await providerPreferencePage.validateURL(providerPreferencePage.url); + await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); await providerPreferencePage.selectProvider(isSafelite); }); } // validations for Recal warning mesage if (isRecalWarning) { - await serviceLocationPage.validateURL(serviceLocationPage.url); + await serviceLocationPage.validateURL(serviceLocationPage.issPageValue); await serviceLocationPage.validateRecalWarning(); } // if isRecalNotifidation flag true additional step to acknowledge Recal notification. if (isRecalNotification) { - await providerPreferencePage.validateURL(providerPreferencePage.url); + await providerPreferencePage.validateURL(providerPreferencePage.issPageValue); await providerPreferencePage.acknowledgeRecalNotificaiton(); } // If No-Comp or ITAC, ProviderPreferencePage does not appear @@ -627,7 +627,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (testCase.testData!.clientTag == '05CC1609-3631-4044-B45A-E78E13343B9A') { // Avoiding TPA flow for Federated Insureance due to Defect# SSR-1984 //Temporary fix until Defect# SSR-1984 is addressed. await test.step('***** Performing Safelite flow for Federal Insurance due to defec# SSR-1984 *****', async () => { }); await test.step('TpaSearchPage >> TPA Search', async () => { - await tpaSearchPage.validateURL(tpaSearchPage.url); + await tpaSearchPage.validateURL(tpaSearchPage.issPageValue); await tpaSearchPage.selectFirstLocation(); // await tpaSearchPage.nextPage(); }); @@ -635,7 +635,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { } if (isTpaNotEnabledBailout) { await test.step('validateBailoutDetails >> Bailout code : ' + BailoutCode.TPANotEnabled, async () => { - await bailoutPage.validateURL(bailoutPage.url); + await bailoutPage.validateURL(bailoutPage.issPageValue); await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.TPANotEnabled); return; }); @@ -644,28 +644,28 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (isDoNotSeeMyShopBailout) { await test.step('TpaSearchPage >> Select "Do Not See My Shop"', async () => { - await tpaSearchPage.validateURL(tpaSearchPage.url); + await tpaSearchPage.validateURL(tpaSearchPage.issPageValue); await tpaSearchPage.selectDoNotSeeMyShop(); }); - await bailoutPage.validateURL(bailoutPage.url); + await bailoutPage.validateURL(bailoutPage.issPageValue); await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.DoNotSeeMyShop); return; } await test.step('TpaSearchPage >> TPA Search', async () => { - await tpaSearchPage.validateURL(tpaSearchPage.url); + await tpaSearchPage.validateURL(tpaSearchPage.issPageValue); await tpaSearchPage.selectFirstLocation(); await tpaSearchPage.nextPage(); }); await test.step('TpaSubmitPage >> TPA Submit', async () => { // TODO: Validations - await tpaSubmitPage.validateURL(tpaSubmitPage.url); + await tpaSubmitPage.validateURL(tpaSubmitPage.issPageValue); await tpaSubmitPage.nextPage(); }); await test.step('TpaConfirmationPage >> TPA Confirmation', async () => { - await tpaConfirmationPage.validateURL(tpaConfirmationPage.url); + await tpaConfirmationPage.validateURL(tpaConfirmationPage.issPageValue); await tpaConfirmationPage.validateSuccessMessage(); return; }); @@ -674,7 +674,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { } await test.step('ServiceLocationPage >> Select service location', async () => { - await serviceLocationPage.validateURL(serviceLocationPage.url); + await serviceLocationPage.validateURL(serviceLocationPage.issPageValue); await serviceLocationPage.selectLocation(appointmentDetails!); if (hasMilitaryWarning) { await expect.soft(serviceLocationPage.militaryWarningMessage).toBeVisible(); @@ -683,7 +683,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); await test.step('SchedulePage >> Select day and time', async () => { - await schedulePage.validateURL(schedulePage.url); + await schedulePage.validateURL(schedulePage.issPageValue); customerDetails!.apptDate = await schedulePage.scheduleFirstAppointment(appointmentDetails!.serviceLocation); }); @@ -694,7 +694,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { email: customerDetails!.email, phoneNumber: customerDetails!.phoneNumber }; - await contactDetailsPage.validateURL(contactDetailsPage.url); + await contactDetailsPage.validateURL(contactDetailsPage.issPageValue); const actualContactDetails = await contactDetailsPage.getContactDetails(); expect.soft(actualContactDetails).toEqual(expectedContactDetails); @@ -709,33 +709,33 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (isPriceServiceErrorBailout) { await test.step('BailoutPage >> Price Service Error Bailout', async () => { - await bailoutPage.validateURL(bailoutPage.url); + await bailoutPage.validateURL(bailoutPage.issPageValue); await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.PricingResponseError); }); return; } await test.step('ServicePackagesPage >> Choose service package', async () => { - await servicePackagesPage.validateURL(servicePackagesPage.url); + await servicePackagesPage.validateURL(servicePackagesPage.issPageValue); customerDetails!.packagePrice = await servicePackagesPage.selectServicePackage(servicePackage!); await servicePackagesPage.nextPage(); }); if (isPolicyFound && (isUseVehicleOnPolicy ?? true) && claimDetails!.policyDeductible > 0) { await test.step('PaymentMethodPage >> Execute Payment', async () => { - await paymentMethodPage.validateURL(paymentMethodPage.url); + await paymentMethodPage.validateURL(paymentMethodPage.issPageValue); await paymentMethodPage.executePayment(paymentDetails!); await paymentMethodPage.nextPage(); }); } else { await test.step('PaymentMethodPage >> Skip to Order Confirmation', async () => { - await paymentMethodPage.validateURL(paymentMethodPage.url); + await paymentMethodPage.validateURL(paymentMethodPage.issPageValue); await paymentMethodPage.nextPage(); }); } await test.step('OrderConfirmationPage >> Validate order', async () => { - await orderConfirmationPage.validateURL(orderConfirmationPage.url); + await orderConfirmationPage.validateURL(orderConfirmationPage.issPageValue); await orderConfirmationPage.validateOrderConfirmationPage(testCase.testData); }); }