chore: Move playwright tests to tests/local-studio-tests (#21488)

* Move the playwright package to tests folder.

* Update the workspace list.

* Change the name of the playwright tests to local studio tests.
This commit is contained in:
Ivan Vasilov authored and GitHub committed 2025-01-09 12:36:32 +01:00
1 parent 3d8c0246f5
commit ab3a3b3c76
13 files changed
+14 -12

No files matched your search

@@ -1,14 +1,16 @@
name: Playwright Tests
name: Local Studio Tests
on:
push:
branches: [master]
paths:
- 'apps/studio/**'
- 'tests/local-studio-tests/**'
- 'pnpm-lock.yaml'
pull_request:
branches: [master]
paths:
- 'apps/studio/**'
- 'tests/local-studio-tests/**'
- 'pnpm-lock.yaml'
# Cancel old builds on new commit for same workflow + branch/PR
@@ -37,14 +39,14 @@ jobs:
- name: Install dependencies
run: pnpm i
- name: Install Playwright Browsers
run: pnpm -C playwright-tests exec playwright install --with-deps
run: pnpm -C tests/local-studio-tests exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm run test:playwright
run: pnpm test:local-studio
# mark the action as succeeded even if the tests failed. This is temporarily until we make the tests more stable.
# continue-on-error: true
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-tests/playwright-report/
path: tests/local-studio-tests/playwright-report/
retention-days: 7
+1 -1
View File
@@ -27,7 +27,7 @@
"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",
"test:playwright": "pnpm --prefix playwright-tests run test",
"test:local-studio": "pnpm --prefix tests/local-studio-tests run test",
"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",
"generate:types": "supabase gen types typescript --local > ./supabase/functions/common/database-types.ts",
+1 -1
View File
@@ -1911,7 +1911,7 @@ importers:
specifier: ^2.0.3
version: 2.1.8(@types/node@20.12.11)(jsdom@20.0.3(supports-color@8.1.1))(msw@2.4.11(typescript@5.5.2))(sass@1.72.0)(supports-color@8.1.1)(terser@5.32.0)
playwright-tests:
tests/local-studio-tests:
devDependencies:
'@playwright/test':
specifier: ^1.41.2
+1 -1
View File
@@ -1,7 +1,7 @@
packages:
- "apps/*"
- "packages/*"
- "playwright-tests"
- "tests/*"
catalog:
'@types/node': ^20.0.0
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
{
"name": "playwright-tests",
"name": "local-studio-tests",
"version": "1.0.0",
"description": "",
"main": "index.js",
@@ -73,8 +73,8 @@ export default defineConfig({
/* Run your local dev server before starting the tests */
webServer: {
// using npm run dev instead of turbo because turbo doesn't stop the server after a test (doesn't handle SIGTERM).
command: 'npm run dev',
cwd: '../apps/studio',
command: 'pnpm dev',
cwd: '../../apps/studio',
url: 'http://localhost:8082',
reuseExistingServer: !process.env.CI,
env: {
@@ -30,7 +30,7 @@ const defaultEnv = {
const environment = { ...generatedEnv, ...defaultEnv }
fs.writeFileSync(
'../apps/studio/.env.test',
'../../apps/studio/.env.test',
Object.keys(environment)
.map((key) => `${key}=${environment[key]}`)
.join('\n')
@@ -1,6 +1,6 @@
# A string used to distinguish different Supabase projects on the same host. Defaults to the
# working directory name when running `supabase init`.
project_id = "playwright-tests"
project_id = "local-studio-tests"
[api]
enabled = true