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