Removes the explicit URL declaration from the page classes. The URL validation and navigation are now handled directly within the tests, providing greater flexibility and control over test execution and removing the need to manage URLs within each page object.
22 lines
No EOL
826 B
TypeScript
22 lines
No EOL
826 B
TypeScript
import { Page } from "@playwright/test";
|
|
import { PartQuestionsPage } from "./PartQuestionPage";
|
|
import { step } from 'framework/localTypes/Step';
|
|
import { ITestData } from 'framework/TestData';
|
|
import { ProgressBarPercentages } from 'framework/localTypes/Enums';
|
|
|
|
export default class MoldingQuestionsPage extends PartQuestionsPage {
|
|
|
|
constructor(page: Page) {
|
|
super(page);
|
|
}
|
|
|
|
@step("MoldingQuestionsPage >> Select Molding Questions: ")
|
|
async handleMoldingQuestionsPage(testCase: Partial<ITestData>) {
|
|
const { moldingQuestions } = testCase;
|
|
|
|
await this.validateProgressBar(ProgressBarPercentages.MoldingQuestionsPage);
|
|
await this.validatePartQuestions(moldingQuestions!);
|
|
await this.selectPartQuestionResponses(moldingQuestions!);
|
|
await this.nextPage();
|
|
}
|
|
} |