Update HomePage.ts
This commit is contained in:
parent
436491da84
commit
f36b7a8e70
1 changed files with 4 additions and 4 deletions
|
|
@ -21,7 +21,7 @@ export class HomePage extends BasePage {
|
||||||
readonly viewQuoteButton: Locator;
|
readonly viewQuoteButton: Locator;
|
||||||
|
|
||||||
//Zip Entry
|
//Zip Entry
|
||||||
readonly widgetZipEntryField: Locator;
|
readonly widgetZipEntryInputField: Locator;
|
||||||
readonly getQuoteAndScheduleButton: Locator;
|
readonly getQuoteAndScheduleButton: Locator;
|
||||||
|
|
||||||
url = process.env['BASE_URL']!;
|
url = process.env['BASE_URL']!;
|
||||||
|
|
@ -30,7 +30,7 @@ export class HomePage extends BasePage {
|
||||||
super(page);
|
super(page);
|
||||||
|
|
||||||
this.page = page;
|
this.page = page;
|
||||||
this.letsGetStartedButton = this.page.getByRole('button', { name: 'Let\'s get started' });
|
this.letsGetStartedButton = this.page.locator('a.zip-submit-button');
|
||||||
this.cusmodalPopup = this.page.locator('#Cusmodalpopup');
|
this.cusmodalPopup = this.page.locator('#Cusmodalpopup');
|
||||||
this.closePopupButton = this.page.getByRole('button', { name: '×' });
|
this.closePopupButton = this.page.getByRole('button', { name: '×' });
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ export class HomePage extends BasePage {
|
||||||
this.viewQuoteButton = this.page.locator('#ctaSubmit');
|
this.viewQuoteButton = this.page.locator('#ctaSubmit');
|
||||||
|
|
||||||
//Zip Entry
|
//Zip Entry
|
||||||
this.widgetZipEntryField = this.page.getByRole('textbox', { name: 'Enter service ZIP code' });
|
this.widgetZipEntryInputField = this.page.locator('input#zipcode');
|
||||||
this.getQuoteAndScheduleButton = this.page.getByLabel('main').getByRole('link', { name: 'Get quote + schedule' });
|
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) {
|
async letsGetStarted(zip: string, enterFunnelWithZip: boolean) {
|
||||||
if (enterFunnelWithZip) {
|
if (enterFunnelWithZip) {
|
||||||
await this.widgetZipEntryField.fill(zip);
|
await this.widgetZipEntryInputField.fill(zip);
|
||||||
/* await this.letsGetStartedButton.evaluate((element, zip) => {
|
/* await this.letsGetStartedButton.evaluate((element, zip) => {
|
||||||
const currentHref = element.getAttribute('href') || '';
|
const currentHref = element.getAttribute('href') || '';
|
||||||
element.setAttribute('href', `${currentHref}?zipCode=${zip}`);
|
element.setAttribute('href', `${currentHref}?zipCode=${zip}`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue