Skip to content

Commit 4c151ec

Browse files
authored
e2e fixes (supabase#39845)
* only require approval on forks * update readme * update example * update readme
1 parent 21d27b9 commit 4c151ec

File tree

3 files changed

+14
-70
lines changed

3 files changed

+14
-70
lines changed

.github/workflows/studio-e2e-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
test:
2929
timeout-minutes: 60
3030
runs-on: ubuntu-latest
31-
# Require approval only for external contributors
32-
environment: ${{ github.event.pull_request.author_association != 'MEMBER' && 'Studio E2E Tests' || '' }}
31+
# Require approval only for pull requests from forks
32+
environment: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork && 'Studio E2E Tests' || '' }}
3333

3434
env:
3535
EMAIL: ${{ secrets.CI_EMAIL }}

e2e/studio/.env.local.example

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11

2-
# 1. Copy and paste this file and rename it to .env.local
2+
# Copy and paste this file and rename it to .env.local
33

4-
# 2. Set the STUDIO_URL and API_URL you want the e2e tests to run against
4+
STUDIO_URL=http://127.0.0.1:54323
5+
API_URL=http://127.0.0.1:54323
6+
IS_PLATFORM=false
57

6-
STUDIO_URL=https://supabase.com/dashboard
7-
API_URL=https://api.supabase.com
8-
AUTHENTICATION=true
9-
10-
# 3. *Optional* If the environment requires auth, set AUTHENTICATION to true, auth credentials, and PROJECT_REF
11-
12-
EMAIL=
13-
PASSWORD=
14-
PROJECT_REF=
8+
# Used to run e2e tests against vercel previews
9+
VERCEL_AUTOMATION_BYPASS_SELFHOSTED_STUDIO=

e2e/studio/README.md

Lines changed: 6 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -6,60 +6,24 @@
66
cp .env.local.example .env.local
77
```
88

9-
Edit the `.env.local` file with your credentials and environment.
10-
119
### Install the playwright browser
1210

1311
⚠️ This should be done in the `e2e/studio` directory
1412

1513
```bash
16-
pnpm exec playwright install
17-
```
18-
19-
## Environments
20-
21-
### Staging
22-
23-
```bash
24-
STUDIO_URL=https://supabase.green/dashboard
25-
API_URL=https://api.supabase.green
26-
AUTHENTICATION=true
27-
28-
PASSWORD=yourpassword
29-
PROJECT_REF=yourprojectref
30-
```
31-
32-
### CLI (NO AUTH)
14+
cd e2e/studio
3315

34-
You'll need to run the CLI locally.
35-
36-
```bash
37-
STUDIO_URL=http://localhost:54323
38-
API_URL=http://localhost:54323/api
39-
AUTHENTICATION=false
16+
pnpm exec playwright install
4017
```
4118

42-
### CLI Development (NO AUTH)
19+
### Run a local Supabase instance
4320

44-
You'll need to run Studio in development mode with `IS_PLATFORM=false`
21+
Make sure you have Supabase CLI installed
4522

4623
```bash
47-
STUDIO_URL=http://localhost:8082/
48-
API_URL=http://localhost:8082/api
49-
AUTHENTICATION=false
50-
```
51-
52-
### Hosted Development
53-
54-
You'll need to run Studio in development mode with `IS_PLATFORM=true`
24+
cd e2e/studio
5525

56-
```bash
57-
STUDIO_URL=http://localhost:8082/
58-
API_URL=http://localhost:8080/api
59-
AUTHENTICATION=true
60-
61-
PASSWORD=yourpassword
62-
PROJECT_REF=yourprojectref
26+
supabase start
6327
```
6428

6529
---
@@ -68,8 +32,6 @@ PROJECT_REF=yourprojectref
6832

6933
Check the `package.json` for the available commands and environments.
7034

71-
#### Example:
72-
7335
```bash
7436
pnpm run e2e
7537
```
@@ -111,19 +73,6 @@ PWDEBUG=1 pnpm run e2e -- --ui
11173

11274
---
11375

114-
## Organization
115-
116-
Name the folders based on the feature you are testing.
117-
118-
```bash
119-
e2e/studio/logs/
120-
e2e/studio/sql-editor/
121-
e2e/studio/storage/
122-
e2e/studio/auth/
123-
```
124-
125-
---
126-
12776
## What should I test?
12877

12978
- Can the feature be navigated to?

0 commit comments

Comments
 (0)