src/page_objects/web/general/onboarding.page.js
import BasePage from "../../base.page.js";
/**
* OnboardingPage
* @extends BasePage
*/
class OnboardingPage extends BasePage {
/**
* @param {args} args Args from controller
*/
constructor(args) {
super(args);
}
// PAGE ELEMENTS
/* eslint-disable require-jsdoc */
onboardingSection() {
return this.element(
"section[class^=components-Onboarding-Onboarding__onboardingContainer"
);
}
nextButton() {
return this.element("button=Next");
}
/* eslint-enable require-jsdoc */
// PAGE FUNCTIONS
/**
* Bypasses the onboarding page if it's present
*/
async bypass() {
if (await this.onboardingSection().isVisible()) {
await this.nextButton().click();
}
}
}
export default OnboardingPage;