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

26 lines
No EOL
941 B
TypeScript

import { Page } from "@playwright/test";
import { PartQuestionsPage } from "./PartQuestionPage";
import { step } from "@business-logic/types/Step";
import { ITestData } from "@business-logic/types/ITestData";
export default class CapabilityQuestionsPage extends PartQuestionsPage {
url = process.env['BASE_URL']! + '/fmg/?fmgPage=capability-questions';
constructor(page: Page) {
super(page);
}
@step("CapabilityQuestionsPage >> Select Capability Questions: ")
async handleCapabilityQuestionsPage(testCase: Partial<ITestData>) {
const { capabilityQuestions } = testCase;
// Validate the capability questions are on the page
await this.validatePartQuestions(capabilityQuestions!);
// Select the capability question responses
await this.selectPartQuestionResponses(capabilityQuestions!);
// Proceed to the next page
await this.nextPage();
}
}