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

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @digital-ai/devops-page-object-release
2
2
 
3
- ## 0.0.0-snapshot-20260121125800
3
+ ## 0.0.0-snapshot-20260122084417
4
4
 
5
5
  ### Patch Changes
6
6
 
package/dist/main.js CHANGED
@@ -10382,29 +10382,30 @@ class $258749e0671c845a$export$f14c0e3f98d164c0 extends (0, $f8721861c660dd88$ex
10382
10382
  timeout: 15000,
10383
10383
  });
10384
10384
  }*/ async login(userName, password) {
10385
- const testEnv = undefined ?? "local";
10386
10385
  await this.page.goto("./");
10387
- if (testEnv === "saas") {
10388
- //await this.waitForKeycloakLogin();
10386
+ const localPassword = this.page.getByPlaceholder("Password");
10387
+ if (await localPassword.isVisible({
10388
+ timeout: 3000
10389
+ }).catch(()=>false)) {
10390
+ await this.page.getByPlaceholder("User").fill(userName);
10391
+ await localPassword.fill(password);
10392
+ } else {
10389
10393
  const usernameInput = this.page.locator('input[name="username"]');
10394
+ await usernameInput.waitFor({
10395
+ state: "visible",
10396
+ timeout: 10000
10397
+ });
10390
10398
  await usernameInput.fill(userName);
10391
- await usernameInput.press("Tab"); // Move focus to next field
10392
10399
  const passwordInput = this.page.locator('input[type="password"]');
10393
- await (0, $kKeXs$playwrighttest.expect)(passwordInput).toBeVisible({
10400
+ await passwordInput.waitFor({
10401
+ state: "visible",
10394
10402
  timeout: 10000
10395
10403
  });
10396
10404
  await passwordInput.fill(password);
10397
- } else {
10398
- await this.page.getByPlaceholder("User").fill(userName);
10399
- await this.page.getByPlaceholder("Password").fill(password);
10400
10405
  }
10401
10406
  await this.page.getByRole("button", {
10402
10407
  name: /log in|sign in/i
10403
10408
  }).click();
10404
- //await expect(this.page).toHaveTitle('Digital.ai Release');
10405
- //await this.page.locator('input#username').fill(userName, { timeout: 1000 });
10406
- //await this.page.locator('input#password').fill(password, { timeout: 10000 });
10407
- //await this.page.getByRole('button', { name: 'Log in' }).click({ timeout: 10000 });
10408
10409
  await this.page.waitForTimeout(1000);
10409
10410
  await this.closePendoModalWindow();
10410
10411
  }