28 lines
No EOL
1.1 KiB
TypeScript
28 lines
No EOL
1.1 KiB
TypeScript
import { Page } from "@playwright/test";
|
|
import { PartQuestionsPage } from "./PartQuestionPage";
|
|
import { step } from "@business-logic/types/Step";
|
|
import { ITestData } from "@business-logic/types/ITestData";
|
|
import { ProgressBarPercentages } from "@business-logic/types/Enums";
|
|
|
|
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;
|
|
|
|
await this.validateProgressBar(ProgressBarPercentages.CapabilityQuestionsPage);
|
|
// 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();
|
|
}
|
|
} |