From b2f1d2d23a421907e848218e0c4b8fd441dd15e5 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Thu, 19 Mar 2026 10:53:55 -0400 Subject: [PATCH] Fix license plate validation --- playwright-tests/pages/VehicleLookupLicensePage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playwright-tests/pages/VehicleLookupLicensePage.ts b/playwright-tests/pages/VehicleLookupLicensePage.ts index 433ed849..926be302 100644 --- a/playwright-tests/pages/VehicleLookupLicensePage.ts +++ b/playwright-tests/pages/VehicleLookupLicensePage.ts @@ -16,7 +16,7 @@ export class VehicleLookupLicensePage extends BasePage { this.licensePlateNumTextBox = page.getByRole('textbox', { name: 'License plate number' }); this.licensePlateStateDrpDwn = page.getByRole('combobox', { name: 'License plate state' }); this.plateNoMatchError = page.getByText('Your license plate didn’t return a VIN match.Please re-enter the information'); - this.plateMismatchAlert = page.getByRole('alert').locator('div'); + this.plateMismatchAlert = page.getByText('We found a windshield, but the VIN associated with the license plate you provided is for a'); } async enterPlateDetails(vehicleDetails: IVehicleDetails, isVehicleLookupValidations = false) { @@ -26,6 +26,7 @@ export class VehicleLookupLicensePage extends BasePage { await this.continueButton.click({ timeout: 1000 }); await expect(this.plateNoMatchError).toBeVisible(); await this.licensePlateNumTextBox.fill(vehicleDetails.licensePlateNumber[1]); + await this.licensePlateStateDrpDwn.selectOption(vehicleDetails.licensePlateState![1]); await this.continueButton.click({ timeout: 1000 }); await expect(this.plateMismatchAlert).toBeVisible(); await this.licensePlateNumTextBox.fill(vehicleDetails.licensePlateNumber[2]);