mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +00:00
f2e6a3264d
Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
25 lines
813 B
TypeScript
25 lines
813 B
TypeScript
import { test as authManageAccountSetup } from "@playwright/test";
|
|
import { SignInPage } from "../sign-in-base/sign-in-base-page";
|
|
|
|
const manageAccountUserFile = "playwright/.auth/manage_account_user.json";
|
|
|
|
authManageAccountSetup(
|
|
"authenticate as manage account e2e user",
|
|
async ({ page }) => {
|
|
const accountEmail = process.env.E2E_MANAGE_ACCOUNT_USER;
|
|
const accountPassword = process.env.E2E_MANAGE_ACCOUNT_PASSWORD;
|
|
|
|
if (!accountEmail || !accountPassword) {
|
|
throw new Error(
|
|
"E2E_MANAGE_ACCOUNT_USER and E2E_MANAGE_ACCOUNT_PASSWORD environment variables are required",
|
|
);
|
|
}
|
|
|
|
const signInPage = new SignInPage(page);
|
|
await signInPage.authenticateAndSaveState(
|
|
{ email: accountEmail, password: accountPassword },
|
|
manageAccountUserFile,
|
|
);
|
|
},
|
|
);
|