From c430ee82ef0570056f5123be55407979ccb1497f Mon Sep 17 00:00:00 2001 From: JennyNou Date: Wed, 25 Mar 2026 09:50:03 -0400 Subject: [PATCH] Add method for non recal TPA flow --- playwright-tests/pages/ProviderPreferencePage.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/playwright-tests/pages/ProviderPreferencePage.ts b/playwright-tests/pages/ProviderPreferencePage.ts index 58525955..97afe80f 100644 --- a/playwright-tests/pages/ProviderPreferencePage.ts +++ b/playwright-tests/pages/ProviderPreferencePage.ts @@ -15,6 +15,7 @@ export class ProviderPreferencePage extends BasePage { readonly acknowledgeCheckbox: Locator; readonly tpaRecalModalContinueButton: Locator; readonly stateLawModalText: Locator; + readonly stateLawRepairModalText: Locator; readonly stateLawModalOkayButton: Locator; issPageValue = 'provider-preference'; @@ -33,8 +34,9 @@ export class ProviderPreferencePage extends BasePage { this.acknowledgeAdasCheckbox = this.page.getByRole('checkbox', { name: /I acknowledge/i }) this.tpaRecalModalContinueButton = this.page.locator('#modalbtn', { hasText: 'Continue' }); - // State law modal + // State law modal - is there a difference between repair and replacement modals? need to check this.stateLawModalText = this.page.getByText(/law prohibits us from requiring you.*You have the right to select the motor vehicle repair shop of your choice\./is); + this.stateLawRepairModalText = this.page.getByText(/We are prohibited by law from requiring that repairs be done at a specific automotive repair dealer. You are entitled to select the auto body repair shop to repair damage covered by us\./is); this.stateLawModalOkayButton = this.page.getByRole('button', { name: 'Okay' }) } @@ -64,7 +66,15 @@ export class ProviderPreferencePage extends BasePage { await this.tpaRecalModalContinueButton.click(); } + async scheduleTPAWithoutAdas() { + await this.findAnotherShopButton.click(); + } + async validateStateLawModalIsVisible() { await expect.soft(this.stateLawModalText).toBeVisible(); } + + async validateStateLawRepairModalIsVisible() { + await expect.soft(this.stateLawRepairModalText).toBeVisible(); + } } \ No newline at end of file