mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> The hang behind the #51141 skips was fixed by the leaf-route subscription in #51067, so this re-enables those tests and extends the existing shim regression test. Supersedes #51157. **Added:** - Re-enabled the four E2E tests skipped in #51141 (API access edit, grant preservation, trigger actions, trigger CRUD) **Changed:** - `router-navigation.test.tsx` now also asserts the router changes on navigation **Removed:** - `STUDIO_FRAMEWORK` from `e2e/studio/env.config.ts`, which those skips were the only consumer of ## To test - [x] `pnpm --filter studio exec vitest run compat/next/router-navigation.test.tsx compat/next/router.test.ts --coverage.enabled=false` – 18 pass; the loader-refresh test fails if `useMatches()` is subscribed without `select` - [x] TanStack, three sequential runs of the four specs (`--workers=1`, no retries) – all pass - [x] Next, one run of the same four specs – all pass Validation: Prettier, Studio typecheck, lint ratchet, and knip all passed. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-266677df-fd82-5155-8395-c2eeb609cc73?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-266677df-fd82-5155-8395-c2eeb609cc73&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
import path from 'path'
|
|
import dotenv from 'dotenv'
|
|
|
|
// Load .env.local before reading process.env
|
|
dotenv.config({
|
|
path: path.resolve(import.meta.dirname, '.env.local'),
|
|
override: true,
|
|
})
|
|
|
|
const toBoolean = (value?: string) => {
|
|
if (value == null) return false
|
|
const normalized = value.trim().toLowerCase()
|
|
return normalized === 'true'
|
|
}
|
|
|
|
// Default service role key for local development
|
|
const DEFAULT_SERVICE_ROLE_KEY =
|
|
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU'
|
|
|
|
export const env = {
|
|
STUDIO_URL: process.env.STUDIO_URL || 'http://localhost:8082',
|
|
API_URL: process.env.API_URL || 'http://127.0.0.1:54321',
|
|
|
|
IS_PLATFORM: toBoolean(process.env.IS_PLATFORM || 'false'),
|
|
EMAIL: process.env.EMAIL,
|
|
PASSWORD: process.env.PASSWORD,
|
|
PROJECT_REF: process.env.PROJECT_REF || undefined,
|
|
|
|
GITHUB_USER: process.env.GITHUB_USER,
|
|
GITHUB_PASS: process.env.GITHUB_PASS,
|
|
GITHUB_TOTP: process.env.GITHUB_TOTP,
|
|
|
|
VERCEL_AUTOMATION_BYPASS_SELFHOSTED_STUDIO:
|
|
process.env.VERCEL_AUTOMATION_BYPASS_SELFHOSTED_STUDIO || 'false',
|
|
ORG_SLUG: process.env.ORG_SLUG || 'default',
|
|
SUPA_REGION: process.env.SUPA_REGION || 'us-east-1',
|
|
SUPA_PAT: process.env.SUPA_PAT || 'test',
|
|
|
|
BRANCH_NAME: process.env.BRANCH_NAME || `e2e-test-local`,
|
|
|
|
AUTHENTICATION:
|
|
Boolean(process.env.EMAIL && process.env.PASSWORD) ||
|
|
Boolean(process.env.GITHUB_USER && process.env.GITHUB_PASS && process.env.GITHUB_TOTP),
|
|
|
|
IS_APP_RUNNING_ON_LOCALHOST:
|
|
process.env.STUDIO_URL?.includes('localhost') || process.env.STUDIO_URL?.includes('127.0.0.1'),
|
|
|
|
SERVICE_ROLE_KEY: process.env.SERVICE_ROLE_KEY || DEFAULT_SERVICE_ROLE_KEY,
|
|
}
|
|
|
|
export const STORAGE_STATE_PATH = path.join(import.meta.dirname, './playwright/.auth/user.json')
|