diff --git a/playwright-tests/pages/CoverageStatementPage.ts b/playwright-tests/pages/CoverageStatementPage.ts index b529f21f1..66ab7c763 100644 --- a/playwright-tests/pages/CoverageStatementPage.ts +++ b/playwright-tests/pages/CoverageStatementPage.ts @@ -10,6 +10,7 @@ export class CoverageStatementPage extends InsuranceBasePage { readonly cancelMyClaimButton: Locator; readonly deductibleAmount: Locator; readonly verifyingCoverageText: Locator; + readonly noCompText: Locator; readonly continueButton: Locator; // For ITAC/NoComp url = process.env['BASE_URL']! + '/FixMyGlass/CoverageStatement.aspx'; @@ -20,6 +21,7 @@ export class CoverageStatementPage extends InsuranceBasePage { this.cancelMyClaimButton = this.page.getByText('Cancel my claim'); this.deductibleAmount = this.page.getByRole('heading', { name: '$' }).locator('span'); this.verifyingCoverageText = this.page.getByRole('heading', { name: 'We\'re verifying your coverage' }); + this.noCompText = this.page.getByRole('heading', { name: 'Your policy doesn\'t cover this service' }); this.continueButton = page.getByRole('button', { name: 'Continue' }); // this.validateURL(this.url); } @@ -54,7 +56,7 @@ export class CoverageStatementPage extends InsuranceBasePage { await expect(deductibleElement).toContainText(`$${expectedDeductibleRegex}`); } - if (await unverifiedDeductibleElement.isVisible()) { + if (await unverifiedDeductibleElement.isVisible() || await this.noCompText.isVisible()) { // Click on continue button if unverified header is visible await this.continueButton.click(); }