Update locators for policy vehicles page

This commit is contained in:
JennyNou 2026-03-10 13:42:34 -04:00
parent 806f27bbd1
commit ce2f640a5f

View file

@ -5,10 +5,14 @@ import { IVehicleDetails } from '@business-logic/types/CustomerDetails';
export class PolicyVehiclesPage extends BasePage {
readonly page: Page;
issPageValue = 'policy-vehicles';
readonly addAnotherVehicleButton: Locator;
readonly selectVehicleOnPolicyButton: Locator;
constructor(page: Page) {
super(page);
this.page = page;
this.addAnotherVehicleButton = this.page.getByText('Add another vehicle');
this.selectVehicleOnPolicyButton = this.page.locator(`input[type="radio"][name="policyVehiclesQuestionOption"]`).first();
// this.validateURL(this.url);
}
@ -21,8 +25,9 @@ export class PolicyVehiclesPage extends BasePage {
const vehicleRegExp = new RegExp(`${vehicleDetails.year} .+ ${vehicleDetails.model}`, 'i');
await this.page.locator('label').filter({hasText: vehicleRegExp}).locator('div').click();
}
async selectVehicleNotListed(){
await this.page.getByText('Vehicle not listed').click();
async addAnotherVehicle(){
await this.page.getByText('Add another vehicle').click();
}
async assertNonServiceableAlertBehavior(){