@digital-ai/devops-page-object-release 0.0.0-snapshot-20260121121759 → 0.0.0-snapshot-20260121132732
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/main.js +1 -34
- package/dist/main.js.map +1 -1
- package/dist/module.js +1 -34
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -9446,40 +9446,7 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
9446
9446
|
timeout: 15000,
|
|
9447
9447
|
});
|
|
9448
9448
|
}*/ async login(userName, password) {
|
|
9449
|
-
|
|
9450
|
-
await this.page.goto("./");
|
|
9451
|
-
if (testEnv === "saas") {
|
|
9452
|
-
//await this.waitForKeycloakLogin();
|
|
9453
|
-
const usernameInput = this.page.locator('input[name="username"]');
|
|
9454
|
-
await usernameInput.fill(userName);
|
|
9455
|
-
// 🔥 Force Keycloak to enable password
|
|
9456
|
-
await usernameInput.dispatchEvent("input");
|
|
9457
|
-
await usernameInput.dispatchEvent("change");
|
|
9458
|
-
await usernameInput.dispatchEvent("blur");
|
|
9459
|
-
// PASSWORD
|
|
9460
|
-
const passwordInput = this.page.locator('input[name="password"]');
|
|
9461
|
-
await passwordInput.waitFor({
|
|
9462
|
-
state: "attached",
|
|
9463
|
-
timeout: 15000
|
|
9464
|
-
});
|
|
9465
|
-
await (0, $hOLA6$expect)(passwordInput).toBeEnabled({
|
|
9466
|
-
timeout: 15000
|
|
9467
|
-
});
|
|
9468
|
-
await passwordInput.focus();
|
|
9469
|
-
await passwordInput.fill(password);
|
|
9470
|
-
} else {
|
|
9471
|
-
await this.page.getByPlaceholder("User").fill(userName);
|
|
9472
|
-
await this.page.getByPlaceholder("Password").fill(password);
|
|
9473
|
-
}
|
|
9474
|
-
await this.page.getByRole("button", {
|
|
9475
|
-
name: /log in|sign in/i
|
|
9476
|
-
}).click();
|
|
9477
|
-
//await expect(this.page).toHaveTitle('Digital.ai Release');
|
|
9478
|
-
//await this.page.locator('input#username').fill(userName, { timeout: 1000 });
|
|
9479
|
-
//await this.page.locator('input#password').fill(password, { timeout: 10000 });
|
|
9480
|
-
//await this.page.getByRole('button', { name: 'Log in' }).click({ timeout: 10000 });
|
|
9481
|
-
await this.page.waitForTimeout(1000);
|
|
9482
|
-
await this.closePendoModalWindow();
|
|
9449
|
+
throw new Error("TEST_ENV is not defined. Aborting login.");
|
|
9483
9450
|
}
|
|
9484
9451
|
async loginWithoutReload(userName, password) {
|
|
9485
9452
|
let loadTriggered = false;
|