mirror of
https://github.com/hanzo-io/beneficiary.git
synced 2026-10-30 18:58:28 +00:00
21 lines
526 B
TypeScript
21 lines
526 B
TypeScript
import { request, FullConfig } from "@playwright/test";
|
|
|
|
async function globalSetup(config: FullConfig) {
|
|
const requestContext = await request.newContext();
|
|
|
|
await requestContext.post(
|
|
"http://changemakers.localhost:8000/api/method/login",
|
|
{
|
|
data: {
|
|
usr: "Administrator",
|
|
pwd: "admin",
|
|
},
|
|
}
|
|
);
|
|
// Save signed-in state to 'storageState.json'.
|
|
// await requestContext.storageState({ path: "storageState.json" });
|
|
await requestContext.dispose();
|
|
}
|
|
|
|
export default globalSetup;
|