Add no comp locator to logic
This commit is contained in:
parent
a7936496f6
commit
037d8ec01f
1 changed files with 3 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ export class CoverageStatementPage extends InsuranceBasePage {
|
||||||
readonly cancelMyClaimButton: Locator;
|
readonly cancelMyClaimButton: Locator;
|
||||||
readonly deductibleAmount: Locator;
|
readonly deductibleAmount: Locator;
|
||||||
readonly verifyingCoverageText: Locator;
|
readonly verifyingCoverageText: Locator;
|
||||||
|
readonly noCompText: Locator;
|
||||||
readonly continueButton: Locator; // For ITAC/NoComp
|
readonly continueButton: Locator; // For ITAC/NoComp
|
||||||
url = process.env['BASE_URL']! + '/FixMyGlass/CoverageStatement.aspx';
|
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.cancelMyClaimButton = this.page.getByText('Cancel my claim');
|
||||||
this.deductibleAmount = this.page.getByRole('heading', { name: '$' }).locator('span');
|
this.deductibleAmount = this.page.getByRole('heading', { name: '$' }).locator('span');
|
||||||
this.verifyingCoverageText = this.page.getByRole('heading', { name: 'We\'re verifying your coverage' });
|
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.continueButton = page.getByRole('button', { name: 'Continue' });
|
||||||
// this.validateURL(this.url);
|
// this.validateURL(this.url);
|
||||||
}
|
}
|
||||||
|
|
@ -54,7 +56,7 @@ export class CoverageStatementPage extends InsuranceBasePage {
|
||||||
await expect(deductibleElement).toContainText(`$${expectedDeductibleRegex}`);
|
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
|
// Click on continue button if unverified header is visible
|
||||||
await this.continueButton.click();
|
await this.continueButton.click();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue