mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +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>
31 lines
1010 B
TypeScript
31 lines
1010 B
TypeScript
import { test as authInviteAndManageUsersSetup } from "@playwright/test";
|
|
import { SignInPage } from "../sign-in-base/sign-in-base-page";
|
|
|
|
const inviteAndManageUsersUserFile =
|
|
"playwright/.auth/invite_and_manage_users_user.json";
|
|
|
|
authInviteAndManageUsersSetup(
|
|
"authenticate as invite and manage users e2e user",
|
|
async ({ page }) => {
|
|
const inviteAndManageUsersEmail =
|
|
process.env.E2E_INVITE_AND_MANAGE_USERS_USER;
|
|
const inviteAndManageUsersPassword =
|
|
process.env.E2E_INVITE_AND_MANAGE_USERS_PASSWORD;
|
|
|
|
if (!inviteAndManageUsersEmail || !inviteAndManageUsersPassword) {
|
|
throw new Error(
|
|
"E2E_INVITE_AND_MANAGE_USERS_USER and E2E_INVITE_AND_MANAGE_USERS_PASSWORD environment variables are required",
|
|
);
|
|
}
|
|
|
|
const signInPage = new SignInPage(page);
|
|
await signInPage.authenticateAndSaveState(
|
|
{
|
|
email: inviteAndManageUsersEmail,
|
|
password: inviteAndManageUsersPassword,
|
|
},
|
|
inviteAndManageUsersUserFile,
|
|
);
|
|
},
|
|
);
|