The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: Move playwright tests to tests/local-studio-tests (#21488)
Ivan Vasilovab3a3b3c7644
diff --git a/.github/workflows/playwright.yml b/.github/workflows/local-studio-tests.ymlsimilarity index 81%rename from .github/workflows/playwright.ymlrename to .github/workflows/local-studio-tests.ymlindex 015031e3153..9c64715b1e0 100644--- a/.github/workflows/playwright.yml+++ b/.github/workflows/local-studio-tests.yml@@ -1,14 +1,16 @@-name: Playwright Tests+name: Local Studio Testson: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 dependenciesrun: 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@v4if: always()with:name: playwright-report- path: playwright-tests/playwright-report/+ path: tests/local-studio-tests/playwright-report/retention-days: 7diff --git a/package.json b/package.jsonindex 20584e4137e..910c69d43fb 100644--- a/package.json+++ b/package.json@@ -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",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 5def67e2b75..d73f05dd8ff 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -1911,7 +1911,7 @@ importers:specifier: ^2.0.3version: 2.1.8(@types/[email protected])([email protected]([email protected]))([email protected]([email protected]))([email protected])([email protected])([email protected])- playwright-tests:+ tests/local-studio-tests:devDependencies:'@playwright/test':specifier: ^1.41.2diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yamlindex cb315b73f4c..b5304a2d449 100644--- a/pnpm-workspace.yaml+++ b/pnpm-workspace.yaml@@ -1,7 +1,7 @@packages:- "apps/*"- "packages/*"- - "playwright-tests"+ - "tests/*"catalog:'@types/node': ^20.0.0diff --git a/playwright-tests/.gitignore b/tests/local-studio-tests/.gitignoresimilarity index 100%rename from playwright-tests/.gitignorerename to tests/local-studio-tests/.gitignorediff --git a/playwright-tests/README.md b/tests/local-studio-tests/README.mdsimilarity index 100%rename from playwright-tests/README.mdrename to tests/local-studio-tests/README.mddiff --git a/playwright-tests/package.json b/tests/local-studio-tests/package.jsonsimilarity index 95%rename from playwright-tests/package.jsonrename to tests/local-studio-tests/package.jsonindex 5fae3769ec1..74671d01b25 100644--- a/playwright-tests/package.json+++ b/tests/local-studio-tests/package.json@@ -1,5 +1,5 @@{- "name": "playwright-tests",+ "name": "local-studio-tests","version": "1.0.0","description": "","main": "index.js",diff --git a/playwright-tests/playwright.config.ts b/tests/local-studio-tests/playwright.config.tssimilarity index 97%rename from playwright-tests/playwright.config.tsrename to tests/local-studio-tests/playwright.config.tsindex c75031d9658..2568a2cdcee 100644--- a/playwright-tests/playwright.config.ts+++ b/tests/local-studio-tests/playwright.config.ts@@ -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: {diff --git a/playwright-tests/scripts/generate-env.js b/tests/local-studio-tests/scripts/generate-env.jssimilarity index 97%rename from playwright-tests/scripts/generate-env.jsrename to tests/local-studio-tests/scripts/generate-env.jsindex 8c091e98d10..5804e6a5222 100644--- a/playwright-tests/scripts/generate-env.js+++ b/tests/local-studio-tests/scripts/generate-env.js@@ -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')diff --git a/playwright-tests/supabase/.gitignore b/tests/local-studio-tests/supabase/.gitignoresimilarity index 100%rename from playwright-tests/supabase/.gitignorerename to tests/local-studio-tests/supabase/.gitignorediff --git a/playwright-tests/supabase/config.toml b/tests/local-studio-tests/supabase/config.tomlsimilarity index 99%rename from playwright-tests/supabase/config.tomlrename to tests/local-studio-tests/supabase/config.tomlindex f4c757c0299..82774ab1abb 100644--- a/playwright-tests/supabase/config.toml+++ b/tests/local-studio-tests/supabase/config.toml@@ -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 = truediff --git a/playwright-tests/supabase/seed.sql b/tests/local-studio-tests/supabase/seed.sqlsimilarity index 100%rename from playwright-tests/supabase/seed.sqlrename to tests/local-studio-tests/supabase/seed.sqldiff --git a/playwright-tests/tests/snapshot/spec/table-editor.spec.ts b/tests/local-studio-tests/tests/snapshot/spec/table-editor.spec.tssimilarity index 100%rename from playwright-tests/tests/snapshot/spec/table-editor.spec.tsrename to tests/local-studio-tests/tests/snapshot/spec/table-editor.spec.ts