UNPKG

@assert-equals/dappdriver

Version:

DappDriver is an e2e testing framework designed for testing decentralized applications (dApps) using MetaMask, Rainbow or Zerion

45 lines (44 loc) 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Password = void 0; const controls_1 = require("../../../controls"); const page_1 = require("../../../page"); const confirm_password_1 = require("./confirm-password"); /** * * * @export * @class Password * @extends {PageObject} */ class Password extends page_1.PageObject { passwordField = () => new controls_1.InputText('input[name="password"]'); confirmButton = () => new controls_1.HTMLElement('xpath=//span[contains(., "Confirm Password")]'); /** * Creates an instance of Password. * @memberof Password */ constructor() { super(new RegExp(/onboarding#\/onboarding\/.*password/), 'Zerion'); } /** * * * @param {string} [password='P@ssword01!'] * @return {*} {Promise<void>} * @memberof Password */ async password(password = 'P@ssword01!') { return await this.passwordField().type(password); } /** * * * @return {*} {Promise<ConfirmPassword>} * @memberof Password */ async confirmPassword() { return await this.confirmButton().click(confirm_password_1.ConfirmPassword); } } exports.Password = Password;