@digital-ai/devops-page-object-release 0.0.0-snapshot-20260122084417 → 0.0.0-snapshot-20260122094725

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/dist/module.js CHANGED
@@ -9445,33 +9445,28 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
9445
9445
  state: 'visible',
9446
9446
  timeout: 15000,
9447
9447
  });
9448
+ }*/ /*async login(userName: string, password: string): Promise<void> {
9449
+ await this.page.goto('./');
9450
+
9451
+ const localPassword = this.page.getByPlaceholder('Password');
9452
+
9453
+ if (await localPassword.isVisible({ timeout: 3000 }).catch(() => false)) {
9454
+ await this.page.getByPlaceholder('User').fill(userName);
9455
+ await localPassword.fill(password);
9456
+ } else {
9457
+ const usernameInput = this.page.locator('input[name="username"]');
9458
+ await usernameInput.waitFor({ state: 'visible', timeout: 10000 });
9459
+ await usernameInput.fill(userName);
9460
+
9461
+ const passwordInput = this.page.locator('input[type="password"]');
9462
+ await passwordInput.waitFor({ state: 'visible', timeout: 10000 });
9463
+ await passwordInput.fill(password);
9464
+ }
9465
+ await this.page.getByRole('button', { name: /log in|sign in/i }).click();
9466
+ await this.page.waitForTimeout(1000);
9467
+ await this.closePendoModalWindow();
9448
9468
  }*/ async login(userName, password) {
9449
- await this.page.goto("./");
9450
- const localPassword = this.page.getByPlaceholder("Password");
9451
- if (await localPassword.isVisible({
9452
- timeout: 3000
9453
- }).catch(()=>false)) {
9454
- await this.page.getByPlaceholder("User").fill(userName);
9455
- await localPassword.fill(password);
9456
- } else {
9457
- const usernameInput = this.page.locator('input[name="username"]');
9458
- await usernameInput.waitFor({
9459
- state: "visible",
9460
- timeout: 10000
9461
- });
9462
- await usernameInput.fill(userName);
9463
- const passwordInput = this.page.locator('input[type="password"]');
9464
- await passwordInput.waitFor({
9465
- state: "visible",
9466
- timeout: 10000
9467
- });
9468
- await passwordInput.fill(password);
9469
- }
9470
- await this.page.getByRole("button", {
9471
- name: /log in|sign in/i
9472
- }).click();
9473
- await this.page.waitForTimeout(1000);
9474
- await this.closePendoModalWindow();
9469
+ throw new Error("TEST_ENV is not defined. Aborting login.");
9475
9470
  }
9476
9471
  async loginWithoutReload(userName, password) {
9477
9472
  let loadTriggered = false;