UNPKG

@umbraco/playwright-testhelpers

Version:

Test helpers for making playwright tests for Umbraco solutions

30 lines 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LoginUiHelper = void 0; const test_1 = require("@playwright/test"); const UiBaseLocators_1 = require("./UiBaseLocators"); class LoginUiHelper extends UiBaseLocators_1.UiBaseLocators { emailTxt; passwordTxt; loginBtn; constructor(page) { super(page); this.emailTxt = page.locator('[name="username"]'); this.passwordTxt = page.locator('[name="password"]'); this.loginBtn = page.getByLabel('Login'); } async enterEmail(email) { await (0, test_1.expect)(this.emailTxt).toBeVisible({ timeout: 20000 }); await this.emailTxt.clear(); await this.emailTxt.fill(email); } async enterPassword(password) { await this.passwordTxt.clear(); await this.passwordTxt.fill(password); } async clickLoginButton() { await this.loginBtn.click(); } } exports.LoginUiHelper = LoginUiHelper; //# sourceMappingURL=LoginUiHelper.js.map