Update name for sms opt in checkbox
This commit is contained in:
parent
0b2c293f42
commit
6826dcf4ca
1 changed files with 5 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ export class BailoutPage extends BasePage {
|
||||||
readonly lastNameTextBox: Locator;
|
readonly lastNameTextBox: Locator;
|
||||||
readonly emailAddressTextBox: Locator;
|
readonly emailAddressTextBox: Locator;
|
||||||
readonly phoneNumberTextBox: Locator;
|
readonly phoneNumberTextBox: Locator;
|
||||||
readonly textOptInBox: Locator;
|
readonly optInToSMSBox: Locator;
|
||||||
|
|
||||||
constructor(page: Page) {
|
constructor(page: Page) {
|
||||||
super(page);
|
super(page);
|
||||||
|
|
@ -20,7 +20,7 @@ export class BailoutPage extends BasePage {
|
||||||
this.lastNameTextBox = this.page.getByRole('textbox', { name: 'Last name' });
|
this.lastNameTextBox = this.page.getByRole('textbox', { name: 'Last name' });
|
||||||
this.emailAddressTextBox = this.page.getByRole('textbox', { name: 'Email address' });
|
this.emailAddressTextBox = this.page.getByRole('textbox', { name: 'Email address' });
|
||||||
this.phoneNumberTextBox = this.page.getByRole('textbox', { name: 'Phone number' });
|
this.phoneNumberTextBox = this.page.getByRole('textbox', { name: 'Phone number' });
|
||||||
this.textOptInBox = this.page.getByRole('checkbox', { name: 'Opt in to SMS' });
|
this.optInToSMSBox = this.page.getByRole('checkbox', { name: 'Opt in to SMS' });
|
||||||
}
|
}
|
||||||
|
|
||||||
async fillOutBailoutForm(customerDetails: ICustomerDetails) {
|
async fillOutBailoutForm(customerDetails: ICustomerDetails) {
|
||||||
|
|
@ -30,8 +30,8 @@ export class BailoutPage extends BasePage {
|
||||||
await this.phoneNumberTextBox.fill(customerDetails!.phoneNumber!);
|
await this.phoneNumberTextBox.fill(customerDetails!.phoneNumber!);
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkTextMeUpdates(customerDetails: ICustomerDetails) {
|
async checkOptInToSMSBox() {
|
||||||
await this.textOptInBox.check();
|
await this.optInToSMSBox.check();
|
||||||
}
|
}
|
||||||
|
|
||||||
@step("BailoutPage >> Fill out bailout form: ")
|
@step("BailoutPage >> Fill out bailout form: ")
|
||||||
|
|
@ -43,7 +43,7 @@ export class BailoutPage extends BasePage {
|
||||||
await this.fillOutBailoutForm(customerDetails!);
|
await this.fillOutBailoutForm(customerDetails!);
|
||||||
|
|
||||||
if (testData.isOptedInForTextMessages) {
|
if (testData.isOptedInForTextMessages) {
|
||||||
await this.checkTextMeUpdates(customerDetails!);
|
await this.checkOptInToSMSBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.nextPage();
|
await this.nextPage();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue