Rename locator for readability
This commit is contained in:
parent
0a9e7c789c
commit
48ad72d996
1 changed files with 3 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ export class HomePage extends BasePage {
|
|||
readonly viewQuoteButton: Locator;
|
||||
|
||||
//Zip Entry
|
||||
readonly zipEntryLetsGetStartedButton: Locator;
|
||||
readonly widgetZipEntryField: Locator;
|
||||
readonly getQuoteAndScheduleButton: Locator;
|
||||
|
||||
url = process.env['BASE_URL']!;
|
||||
|
|
@ -46,7 +46,7 @@ export class HomePage extends BasePage {
|
|||
this.viewQuoteButton = this.page.locator('#ctaSubmit');
|
||||
|
||||
//Zip Entry
|
||||
this.zipEntryLetsGetStartedButton = this.page.getByRole('textbox', { name: 'Enter service ZIP code' });
|
||||
this.widgetZipEntryField = this.page.getByRole('textbox', { name: 'Enter service ZIP code' });
|
||||
this.getQuoteAndScheduleButton = this.page.getByLabel('main').getByRole('link', { name: 'Get quote + schedule' });
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ export class HomePage extends BasePage {
|
|||
|
||||
async letsGetStarted(zip: string, enterFunnelWithZip: boolean) {
|
||||
if (enterFunnelWithZip) {
|
||||
await this.zipEntryLetsGetStartedButton.fill(zip);
|
||||
await this.widgetZipEntryField.fill(zip);
|
||||
/* await this.letsGetStartedButton.evaluate((element, zip) => {
|
||||
const currentHref = element.getAttribute('href') || '';
|
||||
element.setAttribute('href', `${currentHref}?zipCode=${zip}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue