Update locators for policy vehicles page
This commit is contained in:
parent
806f27bbd1
commit
ce2f640a5f
1 changed files with 7 additions and 2 deletions
|
|
@ -5,10 +5,14 @@ import { IVehicleDetails } from '@business-logic/types/CustomerDetails';
|
||||||
export class PolicyVehiclesPage extends BasePage {
|
export class PolicyVehiclesPage extends BasePage {
|
||||||
readonly page: Page;
|
readonly page: Page;
|
||||||
issPageValue = 'policy-vehicles';
|
issPageValue = 'policy-vehicles';
|
||||||
|
readonly addAnotherVehicleButton: Locator;
|
||||||
|
readonly selectVehicleOnPolicyButton: Locator;
|
||||||
|
|
||||||
constructor(page: Page) {
|
constructor(page: Page) {
|
||||||
super(page);
|
super(page);
|
||||||
this.page = 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);
|
// this.validateURL(this.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -21,8 +25,9 @@ export class PolicyVehiclesPage extends BasePage {
|
||||||
const vehicleRegExp = new RegExp(`${vehicleDetails.year} .+ ${vehicleDetails.model}`, 'i');
|
const vehicleRegExp = new RegExp(`${vehicleDetails.year} .+ ${vehicleDetails.model}`, 'i');
|
||||||
await this.page.locator('label').filter({hasText: vehicleRegExp}).locator('div').click();
|
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(){
|
async assertNonServiceableAlertBehavior(){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue