@umbraco/playwright-testhelpers
Version:
Test helpers for making playwright tests for Umbraco solutions
28 lines • 1.21 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.CurrentUserProfileUiHelper = void 0;
const test_1 = require("@playwright/test");
const UiBaseLocators_1 = require("./UiBaseLocators");
class CurrentUserProfileUiHelper extends UiBaseLocators_1.UiBaseLocators {
changePasswordBtn;
constructor(page) {
super(page);
this.changePasswordBtn = page.getByLabel('Change your password');
}
async clickChangePasswordButton() {
await (0, test_1.expect)(this.changePasswordBtn).toBeVisible();
await this.changePasswordBtn.click();
}
async changePassword(currentPassword, newPassword) {
await (0, test_1.expect)(this.currentPasswordTxt).toBeVisible();
await this.currentPasswordTxt.clear();
await this.currentPasswordTxt.fill(currentPassword);
await this.newPasswordTxt.clear();
await this.newPasswordTxt.fill(newPassword);
await this.confirmPasswordTxt.clear();
await this.confirmPasswordTxt.fill(newPassword);
await this.clickConfirmButton();
}
}
exports.CurrentUserProfileUiHelper = CurrentUserProfileUiHelper;
//# sourceMappingURL=CurrentUserProfileUiHelper.js.map
;