diff --git a/playwright-tests/pages/ProviderPreferencePage.ts b/playwright-tests/pages/ProviderPreferencePage.ts index 97afe80f..50b1a617 100644 --- a/playwright-tests/pages/ProviderPreferencePage.ts +++ b/playwright-tests/pages/ProviderPreferencePage.ts @@ -40,17 +40,11 @@ export class ProviderPreferencePage extends BasePage { this.stateLawModalOkayButton = this.page.getByRole('button', { name: 'Okay' }) } - async selectProvider(isSafelite = true) { + async selectProvider(isSafelite: boolean) { if (isSafelite) { await this.scheduleNowButton.click(); await this.nextPage(); } - else { - await this.findAnotherShopButton.waitFor({ state: 'visible' }); - await this.findAnotherShopButton.click(); - await this.tpaRecalModal.waitFor({ state: 'visible' }); - await this.scheduleTPAWithAdas(); - } } async scheduleWithSafeliteADAS() { @@ -60,8 +54,11 @@ export class ProviderPreferencePage extends BasePage { } async scheduleTPAWithAdas() { + await this.findAnotherShopButton.waitFor({ state: 'visible' }); + await this.findAnotherShopButton.click(); + await this.tpaRecalModal.waitFor({ state: 'visible' }); await this.learnMoreLink.click(); - await this.noButton.click(); + await this.noButton.click(); // continue to schedule with TPA even with recal disclaimer await this.acknowledgeAdasCheckbox.click(); await this.tpaRecalModalContinueButton.click(); }