@digital-ai/devops-page-object-release 0.0.0-snapshot-20260123085501 → 0.0.0-snapshot-20260123125310
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 +11 -23
- package/dist/main.js.map +1 -1
- package/dist/module.js +11 -23
- 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
|
@@ -9393,31 +9393,22 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
9393
9393
|
*/ async login(userName, password) {
|
|
9394
9394
|
if (!$hOLA6$env.TEST_ENV) throw new Error("TEST_ENV is not defined. Aborting login.");
|
|
9395
9395
|
const testEnv = $hOLA6$env.TEST_ENV;
|
|
9396
|
-
$hOLA6$stderr.write(`[
|
|
9396
|
+
$hOLA6$stderr.write(`[UI Login Env:]\n` + ` TEST_ENV=${testEnv}\n`);
|
|
9397
9397
|
await this.page.goto("./");
|
|
9398
9398
|
if (testEnv === "saas") {
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
const
|
|
9402
|
-
await
|
|
9403
|
-
state: "visible",
|
|
9404
|
-
timeout: 10000
|
|
9405
|
-
});
|
|
9406
|
-
await usernameInput.fill(userName);
|
|
9407
|
-
const passwordInput = this.page.locator('input[name="password"]');
|
|
9408
|
-
await passwordInput.waitFor({
|
|
9409
|
-
state: "visible",
|
|
9410
|
-
timeout: 10000
|
|
9411
|
-
});
|
|
9412
|
-
await passwordInput.fill(password);
|
|
9399
|
+
const saasUsername = this.page.locator('input[name="username"]');
|
|
9400
|
+
await saasUsername.fill(userName);
|
|
9401
|
+
const saasPassword = this.page.locator('input[name="password"]');
|
|
9402
|
+
await saasPassword.fill(password);
|
|
9413
9403
|
} else {
|
|
9414
|
-
|
|
9415
|
-
await
|
|
9404
|
+
const localUsername = this.page.getByPlaceholder("User");
|
|
9405
|
+
await localUsername.fill(userName);
|
|
9406
|
+
const localPassword = this.page.getByPlaceholder("Password");
|
|
9407
|
+
await localPassword.fill(password);
|
|
9416
9408
|
}
|
|
9417
9409
|
await this.page.getByRole("button", {
|
|
9418
9410
|
name: /log in|sign in/i
|
|
9419
9411
|
}).click();
|
|
9420
|
-
await this.page.waitForTimeout(1000);
|
|
9421
9412
|
await this.closePendoModalWindow();
|
|
9422
9413
|
}
|
|
9423
9414
|
async loginWithoutReload(userName, password) {
|
|
@@ -9629,12 +9620,9 @@ function $80c3ae34677b4324$var$encodeBasicAuth() {
|
|
|
9629
9620
|
const username = $hOLA6$env.TEST_USERNAME;
|
|
9630
9621
|
const password = $hOLA6$env.TEST_PASSWORD;
|
|
9631
9622
|
const environment = $hOLA6$env.TEST_ENV;
|
|
9632
|
-
|
|
9633
|
-
$hOLA6$stderr.write(`[ENV CHECK]\n` + ` TEST_USERNAME=${username}\n` + ` TEST_PASSWORD=${password}\n` + ` TEST_ENV=${environment}\n` + ` TEST_BASEURL=${base_url}\n`);
|
|
9623
|
+
$hOLA6$stderr.write(`[Fixtures Env:]\n` + ` TEST_ENV=${environment}\n`);
|
|
9634
9624
|
if (!username || !password) throw new Error("Missing TEST_USERNAME or TEST_PASSWORD in environment variables");
|
|
9635
|
-
|
|
9636
|
-
$hOLA6$stderr.write(`[AUTH CHECK]\n` + ` BasicAuth(base64)=${encoded}\n`);
|
|
9637
|
-
return encoded;
|
|
9625
|
+
return $80c3ae34677b4324$require$Buffer.from(`${username}:${password}`).toString("base64");
|
|
9638
9626
|
}
|
|
9639
9627
|
const $80c3ae34677b4324$export$1d40aa9bc568f58d = {
|
|
9640
9628
|
Authorization: `Basic ${$80c3ae34677b4324$var$encodeBasicAuth()}`,
|