import { Button, Input, Web } from '@contour/fet/lib/elements'; import { ContourBasePage } from '../../../base/basePage'; import scenarioContext from '../../../util/scenarioContext'; import locator from './forgotPassword.locator'; export class ForgotPasswordPage extends ContourBasePage { constructor(url?: string) { super(locator, url); } getRecoverButton() { return new Button(this.locators.recoverRequestButton); } async requestPasswordResetLink(email: string): Promise { const emailAddress = email || scenarioContext().userDtl.email; await new Input(this.locators.usernameInput).clearInputField(); await new Input(this.locators.usernameInput).setInputField(emailAddress); await this.getRecoverButton().clickElement(); } async assertPage(): Promise { await this.getRecoverButton().checkIsDisplayed(); await Web.checkTitleContainsText(this.title); } }