@digital-ai/devops-page-object-release 0.0.0-snapshot-20260123073622 → 0.0.0-snapshot-20260123084336

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
@@ -9384,14 +9384,18 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
9384
9384
 
9385
9385
 
9386
9386
 
9387
+
9387
9388
  class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
9388
9389
  /**
9389
9390
  * Login with username and password
9390
9391
  * @param userName
9391
9392
  * @param password
9392
9393
  */ async login(userName, password) {
9394
+ if (!$hOLA6$env.TEST_ENV) throw new Error("TEST_ENV is not defined. Aborting login.");
9395
+ const testEnv = $hOLA6$env.TEST_ENV;
9393
9396
  await this.page.goto("./");
9394
- if (this.page.url().includes("/auth/realms")) {
9397
+ if (testEnv === "saas") {
9398
+ //if (this.page.url().includes('/auth/realms')) {
9395
9399
  const usernameInput = this.page.locator('input[name="username"]');
9396
9400
  await usernameInput.waitFor({
9397
9401
  state: "visible",
@@ -9624,9 +9628,11 @@ function $80c3ae34677b4324$var$encodeBasicAuth() {
9624
9628
  const password = $hOLA6$env.TEST_PASSWORD;
9625
9629
  const environment = $hOLA6$env.TEST_ENV;
9626
9630
  const base_url = $hOLA6$env.BASE_URL;
9627
- $hOLA6$stderr.write(`[ENV CHECK]\n` + ` TEST_USERNAME=${username}\n` + ` TEST_PASSWORD=${password}\n` + ` TEST_ENV=${environment}\n` + ` TEST_USERNAME=${base_url}\n`);
9631
+ $hOLA6$stderr.write(`[ENV CHECK]\n` + ` TEST_USERNAME=${username}\n` + ` TEST_PASSWORD=${password}\n` + ` TEST_ENV=${environment}\n` + ` TEST_BASEURL=${base_url}\n`);
9628
9632
  if (!username || !password) throw new Error("Missing TEST_USERNAME or TEST_PASSWORD in environment variables");
9629
- return $80c3ae34677b4324$require$Buffer.from(`${username}:${password}`).toString("base64");
9633
+ const encoded = $80c3ae34677b4324$require$Buffer.from(`${username}:${password}`).toString("base64");
9634
+ $hOLA6$stderr.write(`[AUTH CHECK]\n` + ` BasicAuth(base64)=${encoded}\n`);
9635
+ return encoded;
9630
9636
  }
9631
9637
  const $80c3ae34677b4324$export$1d40aa9bc568f58d = {
9632
9638
  Authorization: `Basic ${$80c3ae34677b4324$var$encodeBasicAuth()}`,