@umbraco/playwright-testhelpers
Version:
Test helpers for making playwright tests for Umbraco solutions
27 lines • 894 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LoginUiHelper = void 0;
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 this.isVisible(this.emailTxt, true, 20000);
await this.enterText(this.emailTxt, email);
}
async enterPassword(password) {
await this.enterText(this.passwordTxt, password);
}
async clickLoginButton() {
await this.loginBtn.click();
}
}
exports.LoginUiHelper = LoginUiHelper;
//# sourceMappingURL=LoginUiHelper.js.map