import { Button, Input, Web } from '@contour/fet/lib/elements'; import { ContourBasePage } from '../../../base/basePage'; import locator from './resetPassword.locator'; export class ResetPasswordPage extends ContourBasePage { constructor(url?: string) { super(locator, url); } getPasswordInput() { return new Input(this.locators.newPasswordInput); } getConfirmPasswordInput() { return new Input(this.locators.confirmPasswordInput); } getResetButton() { return new Button(this.locators.resetButton); } async submitResetPasswordForm(password: string, confirmPassword: string): Promise { await this.getPasswordInput().setInputField(password); await this.getConfirmPasswordInput().setInputField(confirmPassword); await this.getResetButton().clickElement(); } async clearPasswordInputFields(): Promise { await this.getPasswordInput().clearInputField(); await this.getConfirmPasswordInput().clearInputField(); } async assertPage(): Promise { await this.getResetButton().checkIsDisplayed(); await Web.checkTitleContainsText(this.title); } }