@umbraco/playwright-testhelpers
Version:
Test helpers for making playwright tests for Umbraco solutions
31 lines • 1.22 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExternalLoginUiHelpers = void 0;
const UiBaseLocators_1 = require("../UiBaseLocators");
class ExternalLoginUiHelpers extends UiBaseLocators_1.UiBaseLocators {
azureADB2CSignInBtn;
azureADB2CEmailTxt;
azureADB2CPasswordTxt;
signInBtn;
constructor(page) {
super(page);
this.azureADB2CSignInBtn = page.locator('umb-auth-provider-default').getByText('Sign in with Azure AD B2C');
this.azureADB2CEmailTxt = page.locator('#email');
this.azureADB2CPasswordTxt = page.locator('#password');
this.signInBtn = page.getByRole('button', { name: 'Sign in' });
}
async clickSignInWithAzureADB2CButton() {
await this.click(this.azureADB2CSignInBtn);
}
async enterAzureADB2CEmail(email) {
await this.enterText(this.azureADB2CEmailTxt, email);
}
async enterAzureADB2CPassword(password) {
await this.enterText(this.azureADB2CPasswordTxt, password);
}
async clickSignInButton() {
await this.click(this.signInBtn);
}
}
exports.ExternalLoginUiHelpers = ExternalLoginUiHelpers;
//# sourceMappingURL=ExternalLoginUiHelpers.js.map