Update name for sms opt in checkbox

This commit is contained in:
JennyNou 2026-05-12 22:02:52 -04:00
parent 0b2c293f42
commit 6826dcf4ca

View file

@ -10,7 +10,7 @@ export class BailoutPage extends BasePage {
readonly lastNameTextBox: Locator;
readonly emailAddressTextBox: Locator;
readonly phoneNumberTextBox: Locator;
readonly textOptInBox: Locator;
readonly optInToSMSBox: Locator;
constructor(page: Page) {
super(page);
@ -20,7 +20,7 @@ export class BailoutPage extends BasePage {
this.lastNameTextBox = this.page.getByRole('textbox', { name: 'Last name' });
this.emailAddressTextBox = this.page.getByRole('textbox', { name: 'Email address' });
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) {
@ -30,8 +30,8 @@ export class BailoutPage extends BasePage {
await this.phoneNumberTextBox.fill(customerDetails!.phoneNumber!);
}
async checkTextMeUpdates(customerDetails: ICustomerDetails) {
await this.textOptInBox.check();
async checkOptInToSMSBox() {
await this.optInToSMSBox.check();
}
@step("BailoutPage >> Fill out bailout form: ")
@ -43,7 +43,7 @@ export class BailoutPage extends BasePage {
await this.fillOutBailoutForm(customerDetails!);
if (testData.isOptedInForTextMessages) {
await this.checkTextMeUpdates(customerDetails!);
await this.checkOptInToSMSBox();
}
await this.nextPage();