Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

e2e fixes (#39845)

Jordi Enric4c151ec01d1b
diff --git a/.github/workflows/studio-e2e-test.yml b/.github/workflows/studio-e2e-test.yml
index 42eb11cf906..dccb1432237 100644
--- a/.github/workflows/studio-e2e-test.yml
+++ b/.github/workflows/studio-e2e-test.yml
@@ -28,8 +28,8 @@ jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
- # Require approval only for external contributors
- environment: ${{ github.event.pull_request.author_association != 'MEMBER' && 'Studio E2E Tests' || '' }}
+ # Require approval only for pull requests from forks
+ environment: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork && 'Studio E2E Tests' || '' }}
env:
EMAIL: ${{ secrets.CI_EMAIL }}
diff --git a/e2e/studio/.env.local.example b/e2e/studio/.env.local.example
index 256a6101fbd..400bfc19a61 100644
--- a/e2e/studio/.env.local.example
+++ b/e2e/studio/.env.local.example
@@ -1,14 +1,9 @@
-# 1. Copy and paste this file and rename it to .env.local
+# Copy and paste this file and rename it to .env.local
-# 2. Set the STUDIO_URL and API_URL you want the e2e tests to run against
+STUDIO_URL=http://127.0.0.1:54323
+API_URL=http://127.0.0.1:54323
+IS_PLATFORM=false
-STUDIO_URL=https://supabase.com/dashboard
-API_URL=https://api.supabase.com
-AUTHENTICATION=true
-
-# 3. *Optional* If the environment requires auth, set AUTHENTICATION to true, auth credentials, and PROJECT_REF
-
-EMAIL=
-PASSWORD=
-PROJECT_REF=
+# Used to run e2e tests against vercel previews
+VERCEL_AUTOMATION_BYPASS_SELFHOSTED_STUDIO=
\ No newline at end of file
diff --git a/e2e/studio/README.md b/e2e/studio/README.md
index 6ddfe554a10..b3d031623e4 100644
--- a/e2e/studio/README.md
+++ b/e2e/studio/README.md
@@ -6,60 +6,24 @@
cp .env.local.example .env.local
```
-Edit the `.env.local` file with your credentials and environment.
-
### Install the playwright browser
⚠️ This should be done in the `e2e/studio` directory
```bash
-pnpm exec playwright install
-```
-
-## Environments
-
-### Staging
-
-```bash
-STUDIO_URL=https://supabase.green/dashboard
-API_URL=https://api.supabase.green
-AUTHENTICATION=true
-PASSWORD=yourpassword
-PROJECT_REF=yourprojectref
-```
-
-### CLI (NO AUTH)
+cd e2e/studio
-You'll need to run the CLI locally.
-
-```bash
-STUDIO_URL=http://localhost:54323
-API_URL=http://localhost:54323/api
-AUTHENTICATION=false
+pnpm exec playwright install
```
-### CLI Development (NO AUTH)
+### Run a local Supabase instance
-You'll need to run Studio in development mode with `IS_PLATFORM=false`
+Make sure you have Supabase CLI installed
```bash
-STUDIO_URL=http://localhost:8082/
-API_URL=http://localhost:8082/api
-AUTHENTICATION=false
-```
-
-### Hosted Development
-
-You'll need to run Studio in development mode with `IS_PLATFORM=true`
+cd e2e/studio
-```bash
-STUDIO_URL=http://localhost:8082/
-API_URL=http://localhost:8080/api
-AUTHENTICATION=true
-PASSWORD=yourpassword
-PROJECT_REF=yourprojectref
+supabase start
```
---
@@ -68,8 +32,6 @@ PROJECT_REF=yourprojectref
Check the `package.json` for the available commands and environments.
-#### Example:
-
```bash
pnpm run e2e
```
@@ -111,19 +73,6 @@ PWDEBUG=1 pnpm run e2e -- --ui
---
-## Organization
-
-Name the folders based on the feature you are testing.
-
-```bash
-e2e/studio/logs/
-e2e/studio/sql-editor/
-e2e/studio/storage/
-e2e/studio/auth/
-```
-
----
-
## What should I test?
- Can the feature be navigated to?