diff --git a/playwright-tests/business-logic/types/Enums.ts b/playwright-tests/business-logic/types/Enums.ts index 5221d0ea..2c86a60a 100644 --- a/playwright-tests/business-logic/types/Enums.ts +++ b/playwright-tests/business-logic/types/Enums.ts @@ -141,7 +141,8 @@ export enum BailoutCode { HeavyTruckVehicle, NoPartsAvailable, PartsServiceError, - SafeliteNotTheProvider + SafeliteNotTheProvider, + VehicleYMMSLookupError } export enum SignatureAlgorithm { diff --git a/playwright-tests/pages/BasePage.ts b/playwright-tests/pages/BasePage.ts index 8b881b59..0b3c8b0a 100644 --- a/playwright-tests/pages/BasePage.ts +++ b/playwright-tests/pages/BasePage.ts @@ -116,21 +116,25 @@ export class BasePage { } async validateURL(url: string) { - let failCount = 0; - /* - We can't assume that the URL has already changed when we get here, but the point of this - is to help speed up tests, so we want to move on as soon as we can if this passes, but - without waiting too long if it fails - */ - while(failCount < 10) { - await this.page.waitForTimeout(1000); - const currentUrl = this.page.url(); - if(currentUrl == url) - break; - else { - failCount++; + + await test.step(`Validating URL:${url}`, async () => { + let failCount = 0; + /* + We can't assume that the URL has already changed when we get here, but the point of this + is to help speed up tests, so we want to move on as soon as we can if this passes, but + without waiting too long if it fails + */ + while(failCount < 15) { + await this.page.waitForTimeout(1000); + const currentUrl = this.page.url(); + console.log(`Current URL: ${currentUrl}`) + if(currentUrl == url) + break; + else { + failCount++; + } } - } - expect(failCount).not.toEqual(10); + expect(failCount).not.toEqual(15); + }); } } \ No newline at end of file diff --git a/playwright-tests/pages/VehicleLookupAddressPage.ts b/playwright-tests/pages/VehicleLookupAddressPage.ts index ca2cd6f0..33b72cfd 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-vehicles'; + url = process.env['BASE_URL']! + '/?issPage=address-lookup'; constructor(page: Page) { super(page); diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index 5802e1a8..095b9053 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -436,7 +436,7 @@ async function runWorkflow(page: Page, testCase: TestCase) { if (isVehicleLookupBailout) { await test.step('BailoutPage >> Vehicle Lookup Bailout', async () => { await bailoutPage.validateURL(bailoutPage.url); - await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.VehicleLookupError); + await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.VehicleYMMSLookupError); }); return; }