mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
Fix CI: stop e2e dev-env leaking into hermetic package tests + refresh stale project snapshots (#1744)
This commit is contained in:
parent
165d9a0786
commit
4cb0affb64
@ -3,7 +3,7 @@ import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
// Load .env files for the bulldozer-js process so local/dev runs pick up config (e.g. the Sentry DSN)
|
||||
// without exporting env vars by hand. This runs in-process (mirroring apps/e2e/tests/global-setup.ts)
|
||||
// without exporting env vars by hand. This runs in-process (mirroring apps/e2e/tests/load-env.ts)
|
||||
// instead of a dotenv-cli script wrapper, so it covers every entrypoint: `pnpm dev`, `pnpm start`, the
|
||||
// studio/profiling scripts, and a bare `node --import tsx src/index.ts`.
|
||||
//
|
||||
|
||||
@ -66,6 +66,7 @@ it("should be able to provision a new project if client details are correct", as
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "Project created by an external integration",
|
||||
"display_name": "Test project",
|
||||
@ -78,6 +79,7 @@ it("should be able to provision a new project if client details are correct", as
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": null,
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
|
||||
@ -123,6 +123,7 @@ it("lists oauth providers", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -135,6 +136,7 @@ it("lists oauth providers", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ it("get project details", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -48,6 +49,7 @@ it("get project details", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -95,6 +97,7 @@ it("creates and updates the basic project information of a project", async ({ ex
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "Updated description",
|
||||
"display_name": "Updated Project",
|
||||
@ -107,6 +110,7 @@ it("creates and updates the basic project information of a project", async ({ ex
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -170,6 +174,7 @@ it("creates and updates the email config of a project", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -182,6 +187,7 @@ it("creates and updates the email config of a project", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
|
||||
@ -66,6 +66,7 @@ it("should be able to provision a new project if neon client details are correct
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "Created with Neon",
|
||||
"display_name": "Test project",
|
||||
@ -78,6 +79,7 @@ it("should be able to provision a new project if neon client details are correct
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": null,
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
|
||||
@ -102,6 +102,7 @@ it("creates a new project", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "Test Project",
|
||||
@ -114,6 +115,7 @@ it("creates a new project", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -197,6 +199,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "Test description",
|
||||
"display_name": "Test Project",
|
||||
@ -209,6 +212,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -257,6 +261,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "Test Project",
|
||||
@ -269,6 +274,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -308,6 +314,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "Test Project",
|
||||
@ -320,6 +327,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -373,6 +381,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "Test Project",
|
||||
@ -385,6 +394,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -440,6 +450,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "Test Project",
|
||||
@ -452,6 +463,7 @@ it("creates a new project with different configurations", async ({ expect }) =>
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -490,6 +502,7 @@ it("lists the current projects after creating a new project", async ({ expect })
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -502,6 +515,7 @@ it("lists the current projects after creating a new project", async ({ expect })
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -546,6 +560,7 @@ it("verifies email_theme update persists", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -558,6 +573,7 @@ it("verifies email_theme update persists", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -591,6 +607,7 @@ it("verifies email_theme update persists", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -603,6 +620,7 @@ it("verifies email_theme update persists", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -646,6 +664,7 @@ it("updates trusted domains without modifying allow_localhost", async ({ expect
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -658,6 +677,7 @@ it("updates trusted domains without modifying allow_localhost", async ({ expect
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -704,6 +724,7 @@ it("updates trusted domains without modifying allow_localhost", async ({ expect
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -716,6 +737,7 @@ it("updates trusted domains without modifying allow_localhost", async ({ expect
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -779,6 +801,7 @@ it("lets user update logo_url to a valid image", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -791,6 +814,7 @@ it("lets user update logo_url to a valid image", async ({ expect }) => {
|
||||
"logo_url": "http://localhost:<$NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX>21/stack-storage/project-logos/<stripped UUID>.png",
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
|
||||
@ -234,6 +234,7 @@ it("can customize default user permissions", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [{ "id": "test" }],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -246,6 +247,7 @@ it("can customize default user permissions", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
|
||||
@ -56,8 +56,10 @@ it("gets current project (internal)", async ({ expect }) => {
|
||||
"passkey_enabled": false,
|
||||
"sign_up_enabled": true,
|
||||
},
|
||||
"config_warnings": [],
|
||||
"display_name": "Hexclave Dashboard",
|
||||
"id": "internal",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -97,6 +99,7 @@ it("creates and updates the basic project information of a project", async ({ ex
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "Updated description",
|
||||
"display_name": "Updated Project",
|
||||
@ -109,6 +112,7 @@ it("creates and updates the basic project information of a project", async ({ ex
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -151,6 +155,7 @@ it("updates the basic project configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -163,6 +168,7 @@ it("updates the basic project configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -210,6 +216,7 @@ it("updates the project domains configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -222,6 +229,7 @@ it("updates the project domains configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -275,6 +283,7 @@ it("updates the project domains configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -287,6 +296,7 @@ it("updates the project domains configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -334,6 +344,7 @@ it("should allow insecure HTTP connections if insecureHttp is true", async ({ ex
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -346,6 +357,7 @@ it("should allow insecure HTTP connections if insecureHttp is true", async ({ ex
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -436,6 +448,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -448,6 +461,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -500,6 +514,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -512,6 +527,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -550,6 +566,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -562,6 +579,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -600,6 +618,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -612,6 +631,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -664,6 +684,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -676,6 +697,7 @@ it("updates the project email configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -841,6 +863,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -853,6 +876,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -898,6 +922,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -910,6 +935,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -959,6 +985,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -971,6 +998,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -1015,6 +1043,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -1027,6 +1056,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -1086,6 +1116,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -1098,6 +1129,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
@ -1157,6 +1189,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "team_member" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -1169,6 +1202,7 @@ it("updates the project oauth configuration", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
|
||||
@ -252,6 +252,7 @@ it("can customize default team permissions", async ({ expect }) => {
|
||||
"team_member_default_permissions": [{ "id": "test" }],
|
||||
"user_default_permissions": [],
|
||||
},
|
||||
"config_warnings": [],
|
||||
"created_at_millis": <stripped field 'created_at_millis'>,
|
||||
"description": "",
|
||||
"display_name": "New Project",
|
||||
@ -264,6 +265,7 @@ it("can customize default team permissions", async ({ expect }) => {
|
||||
"logo_url": null,
|
||||
"onboarding_status": "completed",
|
||||
"owner_team_id": "<stripped UUID>",
|
||||
"pushed_config_error": null,
|
||||
},
|
||||
"headers": Headers { <some fields may have been hidden> },
|
||||
}
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
import dotenv from "dotenv";
|
||||
import path from "path";
|
||||
|
||||
export default function globalSetup() {
|
||||
dotenv.config({
|
||||
path: [
|
||||
".env.test.local",
|
||||
".env.test",
|
||||
".env.development.local",
|
||||
".env.local",
|
||||
".env.development",
|
||||
".env",
|
||||
].map((file) => path.resolve(__dirname, "..", file)),
|
||||
});
|
||||
|
||||
return () => {};
|
||||
}
|
||||
25
apps/e2e/tests/load-env.ts
Normal file
25
apps/e2e/tests/load-env.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import dotenv from "dotenv";
|
||||
import path from "path";
|
||||
|
||||
// Loaded as the first `setupFiles` entry (NOT as a vitest `globalSetup`).
|
||||
//
|
||||
// A `globalSetup` runs once in vitest's main process, and any `process.env`
|
||||
// mutation it makes is inherited by every worker thread that vitest spawns
|
||||
// afterwards — including workers running unrelated projects. That leaks this
|
||||
// app's dev env (e.g. NEXT_PUBLIC_HEXCLAVE_HOSTED_HANDLER_DOMAIN_SUFFIX) into
|
||||
// the hermetic SDK unit tests in packages/*, breaking assertions that expect
|
||||
// production defaults. `setupFiles` run per-project inside the worker, so the
|
||||
// env stays scoped to this project's tests and does not leak.
|
||||
//
|
||||
// This must be the first setupFile so the env is populated before setup.ts (and
|
||||
// the helpers it imports) is evaluated.
|
||||
dotenv.config({
|
||||
path: [
|
||||
".env.test.local",
|
||||
".env.test",
|
||||
".env.development.local",
|
||||
".env.local",
|
||||
".env.development",
|
||||
".env",
|
||||
].map((file) => path.resolve(__dirname, "..", file)),
|
||||
});
|
||||
@ -9,8 +9,11 @@ export default mergeConfig(
|
||||
test: {
|
||||
environment: 'node',
|
||||
testTimeout: process.env.CI ? 60_000 : 30_000,
|
||||
globalSetup: './tests/global-setup.ts',
|
||||
setupFiles: [
|
||||
// load-env must come first so env vars are populated before setup.ts
|
||||
// (and the helpers it imports) is evaluated. See load-env.ts for why
|
||||
// this is a setupFile rather than a globalSetup.
|
||||
"./tests/load-env.ts",
|
||||
"./tests/setup.ts",
|
||||
],
|
||||
snapshotSerializers: ["./tests/snapshot-serializer.ts"],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user