UNPKG

@assert-equals/dappdriver

Version:

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

56 lines (55 loc) 1.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreatePassword = void 0; const __1 = require("../.."); const controls_1 = require("../../../controls"); const page_1 = require("../../../page"); /** * * * @export * @class CreatePassword * @extends {PageObject} */ class CreatePassword extends page_1.PageObject { passwordInput = () => new controls_1.InputText('[data-testid="password-input"]'); confirmPasswordInput = () => new controls_1.InputText('[data-testid="confirm-password-input"]'); setPasswordButton = () => new controls_1.HTMLElement('[data-testid="set-password-button"]'); /** * Creates an instance of CreatePassword. * @memberof CreatePassword */ constructor() { super('/popup.html#/create-password', 'Rainbow Wallet'); } /** * * * @param {string} [password='P@ssword01!'] * @return {*} {Promise<void>} * @memberof CreatePassword */ async confirmPassword(password = 'P@ssword01!') { return await this.confirmPasswordInput().type(password); } /** * * * @param {string} [password='P@ssword01!'] * @return {*} {Promise<void>} * @memberof CreatePassword */ async enterPassword(password = 'P@ssword01!') { return await this.passwordInput().type(password); } /** * * * @return {*} {Promise<Ready>} * @memberof CreatePassword */ async setPassword() { return await this.setPasswordButton().click(__1.Ready); } } exports.CreatePassword = CreatePassword;