From bb56843114fa4191244c99831552c6fbf0dc08c6 Mon Sep 17 00:00:00 2001 From: JennyNou <167806377+JennyNou@users.noreply.github.com> Date: Tue, 31 Mar 2026 14:36:28 -0400 Subject: [PATCH] Change flow to select no for sms opt in --- playwright-tests/pages/PaymentMethodPage.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/playwright-tests/pages/PaymentMethodPage.ts b/playwright-tests/pages/PaymentMethodPage.ts index c715e02f..d7c7ef9c 100644 --- a/playwright-tests/pages/PaymentMethodPage.ts +++ b/playwright-tests/pages/PaymentMethodPage.ts @@ -35,7 +35,7 @@ export class PaymentMethodPage extends BasePage { this.payAtAppointmentButton = this.page.locator('[buttonlabel="Pay at my appointment"]'); this.textReminderYesButton = this.page.locator('div.button-content', { hasText: /^yes$/i }); - this.textReminderNoButton = this.page.locator('div.button-content', { hasText: 'No' }); + this.textReminderNoButton = this.page.locator('div.button-content', { hasText: /^no$/i }); this.continueToCheckoutButton = this.page.getByRole('button', { name: 'Continue to checkout' }); this.submitButton = this.page.getByRole('button', { name: 'Submit' }); } @@ -46,20 +46,20 @@ export class PaymentMethodPage extends BasePage { switch (paymentDetails.paymentType) { case PaymentType.Credit: await this.payNowButton.click(); - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.continueToCheckoutButton.click(); await this.selectCreditCard(paymentDetails); break; case PaymentType.Paypal: await this.payNowButton.click(); - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.continueToCheckoutButton.click(); await this.selectPaypal(); await this.paypalPage.completePaypalPurchase(paymentDetails); break; case PaymentType.AfterPay: await this.payInFourButton.click(); - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.continueToCheckoutButton.click(); // Capture popup @@ -72,7 +72,7 @@ export class PaymentMethodPage extends BasePage { case PaymentType.PayAtService: await this.payAtAppointmentButton.click(); - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.submitButton.click(); break; default: @@ -94,7 +94,7 @@ export class PaymentMethodPage extends BasePage { } async submitOrderWithoutPIA() { - await this.textReminderYesButton.click(); + await this.textReminderNoButton.click(); await this.submitButton.click(); } } \ No newline at end of file