You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The smoke suite covers seeded sign-in, public listing, profile, and chat flows against local Supabase data. It is designed to stay small and high-signal rather than grow into a broad frontend testing matrix.
264
264
265
+
Before `npm run test:e2e` or `npm run test:e2e:prod`, make sure you are using the local seeded app stack, not hosted Supabase:
266
+
267
+
- Run `npm run supabase:start`
268
+
- Run `npm run supabase:reset`
269
+
- Run `npm run seed:local-media`
270
+
- Run `npm run supabase:env`
271
+
- Make sure `.env.local` uses `NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54331`
272
+
- Copy the local `ANON_KEY` into `NEXT_PUBLIC_SUPABASE_ANON_KEY`
273
+
274
+
If your `.env.local` was previously set up for the hosted Peels project, update it before running Playwright. A working local test setup looks like:
275
+
276
+
```bash
277
+
NEXT_PUBLIC_SITE_URL=http://127.0.0.1:3000
278
+
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54331
279
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=<paste the ANON_KEY from npm run supabase:env>
280
+
```
281
+
282
+
Then run either:
283
+
284
+
```bash
285
+
npm run test:e2e
286
+
```
287
+
288
+
or:
289
+
290
+
```bash
291
+
npm run test:e2e:prod
292
+
```
293
+
294
+
Use the local anon key that matches the running local Supabase stack. Do not mix the hosted project URL with the local anon key, or the local URL with a hosted anon key.
295
+
296
+
The production-like Playwright config starts its own `next start` server so it does not accidentally reuse a stray `next dev` process on port `3000`.
297
+
265
298
In CI, pull requests run `npm run check` and `npm run build`. Pushes to `main` also run the production-like Playwright smoke suite.
266
299
267
300
For the first local Playwright run, install the browser once with:
Copy file name to clipboardExpand all lines: docs/supabase-local-first.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,29 @@ Finally:
98
98
npm run dev
99
99
```
100
100
101
+
### Local `.env.local` for Playwright
102
+
103
+
Both Playwright suites expect the local seeded Supabase stack, not the hosted Peels project.
104
+
105
+
Use this shape in `.env.local` before `npm run test:e2e:prod`:
106
+
107
+
```bash
108
+
NEXT_PUBLIC_SITE_URL=http://127.0.0.1:3000
109
+
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54331
110
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=<paste the ANON_KEY value from npm run supabase:env>
111
+
```
112
+
113
+
Recommended sequence:
114
+
115
+
1. Run `npm run supabase:start`
116
+
2. Run `npm run supabase:reset`
117
+
3. Run `npm run seed:local-media`
118
+
4. Run `npm run supabase:env`
119
+
5. Paste the printed `ANON_KEY` into `.env.local`
120
+
6. Run `npm run test:e2e` or `npm run test:e2e:prod`
121
+
122
+
If `.env.local` still points at `https://mfnaqdyunuafbwukbbyr.supabase.co`, the smoke suite will not see the seeded local listings, demo accounts, or demo chat thread.
0 commit comments