@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 +1 -1
- package/dist/main.js +13 -12
- package/dist/main.js.map +1 -1
- package/dist/module.js +13 -12
- 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,29 +9446,30 @@ class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$ex
|
|
|
9446
9446
|
timeout: 15000,
|
|
9447
9447
|
});
|
|
9448
9448
|
}*/ async login(userName, password) {
|
|
9449
|
-
const testEnv = undefined ?? "local";
|
|
9450
9449
|
await this.page.goto("./");
|
|
9451
|
-
|
|
9452
|
-
|
|
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 {
|
|
9453
9457
|
const usernameInput = this.page.locator('input[name="username"]');
|
|
9458
|
+
await usernameInput.waitFor({
|
|
9459
|
+
state: "visible",
|
|
9460
|
+
timeout: 10000
|
|
9461
|
+
});
|
|
9454
9462
|
await usernameInput.fill(userName);
|
|
9455
|
-
await usernameInput.press("Tab"); // Move focus to next field
|
|
9456
9463
|
const passwordInput = this.page.locator('input[type="password"]');
|
|
9457
|
-
await
|
|
9464
|
+
await passwordInput.waitFor({
|
|
9465
|
+
state: "visible",
|
|
9458
9466
|
timeout: 10000
|
|
9459
9467
|
});
|
|
9460
9468
|
await passwordInput.fill(password);
|
|
9461
|
-
} else {
|
|
9462
|
-
await this.page.getByPlaceholder("User").fill(userName);
|
|
9463
|
-
await this.page.getByPlaceholder("Password").fill(password);
|
|
9464
9469
|
}
|
|
9465
9470
|
await this.page.getByRole("button", {
|
|
9466
9471
|
name: /log in|sign in/i
|
|
9467
9472
|
}).click();
|
|
9468
|
-
//await expect(this.page).toHaveTitle('Digital.ai Release');
|
|
9469
|
-
//await this.page.locator('input#username').fill(userName, { timeout: 1000 });
|
|
9470
|
-
//await this.page.locator('input#password').fill(password, { timeout: 10000 });
|
|
9471
|
-
//await this.page.getByRole('button', { name: 'Log in' }).click({ timeout: 10000 });
|
|
9472
9473
|
await this.page.waitForTimeout(1000);
|
|
9473
9474
|
await this.closePendoModalWindow();
|
|
9474
9475
|
}
|