DigitalConsumer.FixMyGlass/playwright-tests/pages/PolicyInfoSubmittedPage.ts
maguire-arman a2ca9134d1 Initializes Playwright test framework
Sets up the core infrastructure for Playwright-based automated testing, including:
- Docker support for consistent environments
- Azure Pipelines configuration for CI/CD
- Page Object Model structure for maintainable tests
- Test data, validation, and rule engine implementation
- Test configuration for alerts and other scenarios
2025-05-08 15:45:05 -04:00

30 lines
No EOL
1.1 KiB
TypeScript

import { expect, type Locator, type Page } from '@playwright/test';
import { InsuranceBasePage } from './InsuranceBasePage';
import { step } from '@business-logic/types/Step';
export class PolicyInfoSubmittedPage extends InsuranceBasePage {
readonly page: Page;
readonly policyInfoMessage: Locator;
url = process.env['BASE_URL']! + '/FixMyGlass/PolicyInfoSubmitted.aspx';
constructor(page: Page) {
super(page);
this.page = page;
this.policyInfoMessage = this.page.getByRole('heading', { name: 'Your policy and vehicle' });
// this.validateURL(this.url);
}
async verifyPolicyInfoSubmitted(): Promise<void> {
await expect(this.policyInfoMessage).toBeVisible();
const policyInfoMessage = await this.policyInfoMessage.textContent();
expect(policyInfoMessage).toBe("Your policy and vehicle information has been submitted for coverage verification")
}
@step("PolicyInfoSubmittedPage >> Verify policy info submitted: ")
async handlePolicyInfoSubmittedPage() {
await this.verifyPolicyInfoSubmitted();
await this.nextPage();
}
}