Fix license plate validation
This commit is contained in:
parent
bd11b53413
commit
b2f1d2d23a
1 changed files with 2 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ export class VehicleLookupLicensePage extends BasePage {
|
||||||
this.licensePlateNumTextBox = page.getByRole('textbox', { name: 'License plate number' });
|
this.licensePlateNumTextBox = page.getByRole('textbox', { name: 'License plate number' });
|
||||||
this.licensePlateStateDrpDwn = page.getByRole('combobox', { name: 'License plate state' });
|
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.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) {
|
async enterPlateDetails(vehicleDetails: IVehicleDetails, isVehicleLookupValidations = false) {
|
||||||
|
|
@ -26,6 +26,7 @@ export class VehicleLookupLicensePage extends BasePage {
|
||||||
await this.continueButton.click({ timeout: 1000 });
|
await this.continueButton.click({ timeout: 1000 });
|
||||||
await expect(this.plateNoMatchError).toBeVisible();
|
await expect(this.plateNoMatchError).toBeVisible();
|
||||||
await this.licensePlateNumTextBox.fill(vehicleDetails.licensePlateNumber[1]);
|
await this.licensePlateNumTextBox.fill(vehicleDetails.licensePlateNumber[1]);
|
||||||
|
await this.licensePlateStateDrpDwn.selectOption(vehicleDetails.licensePlateState![1]);
|
||||||
await this.continueButton.click({ timeout: 1000 });
|
await this.continueButton.click({ timeout: 1000 });
|
||||||
await expect(this.plateMismatchAlert).toBeVisible();
|
await expect(this.plateMismatchAlert).toBeVisible();
|
||||||
await this.licensePlateNumTextBox.fill(vehicleDetails.licensePlateNumber[2]);
|
await this.licensePlateNumTextBox.fill(vehicleDetails.licensePlateNumber[2]);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue