Fix: Update e2e command to run webserver rather than asking devs to manaully start it (#40398)

* removed e2e scripts that are not being used

* updated tests to use local configs

* updated README test

* updated to only run web server locally
This commit is contained in:
Ali Waseem authored and GitHub committed 2025-11-14 07:30:45 -07:00
1 parent c82a0191c9
commit c76723c909
4 files changed
+15 -21

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
# Copy and paste this file and rename it to .env.local
STUDIO_URL=http://127.0.0.1:54323
API_URL=http://127.0.0.1:54323
STUDIO_URL=http://localhost:8082
API_URL=http://127.0.0.1:54321
IS_PLATFORM=false
# Used to run e2e tests against vercel previews
-10
View File
@@ -16,16 +16,6 @@ cd e2e/studio
pnpm exec playwright install
```
### Run a local Supabase instance
Make sure you have Supabase CLI installed
```bash
cd e2e/studio
supabase start
```
---
## Running the tests
+12 -1
View File
@@ -3,10 +3,20 @@ import { env, STORAGE_STATE_PATH } from './env.config'
import dotenv from 'dotenv'
import path from 'path'
dotenv.config({ path: path.resolve(__dirname, '.env.local') })
dotenv.config({
path: path.resolve(__dirname, '.env.local'),
})
const IS_CI = !!process.env.CI
const webServerConfig = IS_CI
? undefined
: {
command: 'pnpm -w run e2e:setup',
port: 8082,
timeout: 5 * 60 * 1000,
}
export default defineConfig({
timeout: 90 * 1000,
testDir: './features',
@@ -51,4 +61,5 @@ export default defineConfig({
['html', { open: 'never' }],
['json', { outputFile: 'test-results/test-results.json' }],
],
webServer: webServerConfig,
})
+1 -8
View File
@@ -29,15 +29,8 @@
"test:ui-patterns": "turbo run test --filter=ui-patterns",
"test:studio": "turbo run test --filter=studio",
"test:studio:watch": "turbo run test --filter=studio -- watch",
"e2e:setup": "pnpm setup:cli && NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=4096\" pnpm run build:studio && NODE_ENV=test pnpm --prefix ./apps/studio start --port 8082",
"e2e": "pnpm --prefix e2e/studio run e2e",
"e2e:dev-hosted": "pnpm --prefix e2e/studio run e2e:dev-hosted",
"e2e:dev-selfhosted": "pnpm --prefix e2e/studio run e2e:dev-selfhosted",
"e2e:selfhosted": "pnpm --prefix e2e/studio run e2e:selfhosted",
"e2e:staging": "pnpm --prefix e2e/studio run e2e:staging",
"e2e:prod": "pnpm --prefix e2e/studio run e2e:prod",
"e2e:ci": "pnpm --prefix e2e/studio run e2e:ci",
"e2e:supabase:start": "pnpm --prefix e2e/studio run supabase:start",
"e2e:supabase:stop": "pnpm --prefix e2e/studio run supabase:stop",
"perf:kong": "ab -t 5 -c 20 -T application/json http://localhost:8000/",
"perf:meta": "ab -t 5 -c 20 -T application/json http://localhost:5555/tables",
"setup:cli": "supabase start -x studio && supabase status --output json > keys.json && node scripts/generateLocalEnv.js",