DigitalConsumer.FixMyGlass/playwright-tests/pages/DuplicateCheckPage.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

28 lines
No EOL
976 B
TypeScript

import { expect, type Locator, type Page } from '@playwright/test';
import { InsuranceBasePage } from './InsuranceBasePage';
import { ITestData } from '@business-logic/types/ITestData';
import { step } from '@business-logic/types/Step';
export class DuplicateCheckPage extends InsuranceBasePage {
readonly page: Page;
readonly newClaimButton: Locator;
url = process.env['BASE_URL']! + '/FixMyGlass/DuplicateCheck.aspx';
constructor(page: Page) {
super(page);
this.page = page;
this.newClaimButton = page.locator('a').filter({ hasText: 'Start a new claim Start a new' });
// this.validateURL(this.url);
}
async startNewClaim(){
await this.newClaimButton.click();
await this.page.waitForLoadState();
}
@step("DuplicateCheckPage >> Start a new claim: ")
async handleDuplicateCheckPage(testCase: Partial<ITestData>) {
await this.startNewClaim();
await this.nextPage();
}
}