Files
supabase/playwright-tests
Francesco Sansalvadore 0035920bf1 feat: studio mobile nav (#31080)
* SheetProvider in studio

* mobile global nav

* view sub navigation

* fix ProjectLayout conditional

* Account mobile layout

* width

* hide

* layout

* overflow

* responsive button

* overflow

* fix mobile nav if IS_PLATFORM

* refactor

* hide if no content

* show command menu item on mobile

* ui-patterns sheet provider

* use client

* show if productMenu

* show if productMenu

* drag to close

* drag to close

* 16px input fontsize on inputs to avoid zoom on mobile

* offscreen test element

* offscreen test element

* offscreen test element

* update test

* update test

* update test

* pb

* test?

* test

* test

* test

* spec-click-target

* remove console

* remove unused import

* add dependency to sheet content

* close sheet on router.asPath change

* remove provider and use simple Sheet

* update sidebar mobile

* align labels

* avoid input zoom on mobile

* remove yo
2024-12-16 10:49:17 -04:00
..
2024-02-19 12:12:54 +01:00
2024-02-19 12:12:54 +01:00
2024-02-19 12:12:54 +01:00
2024-02-19 12:12:54 +01:00

Local studio tests

In an effort to make the local studio more stable, we've added tests which test features which are commonly used in local development. Built with Playwright.

How to run tests

Before running the tests, make sure you've done the following:

  • Run npm install in the root folder of this repo
  • docker or orbstack is currently running
  • supabase CLI is already installed
  • no other supabase local environment is running (infrastructure environment is ok)

You can run the tests by running npm run test in this folder.

When you run the command, it includes:

  1. Setting up the local environment using the supabase CLI
  2. Extracting the environment variables and saving them into a .env.test file in the studio app
  3. Running the studio app in dev mode (npm run dev)
  4. Running the tests
  5. Stopping the studio app and the local environment

If the environment does't stop for some reason, you'll see supabase start is already running on the next run. In this case, just run supabase stop between test runs.

How to write tests

Playwright has a nice Codegen tool which you can use to record your actions:

npm run codegen:setup
# in a separate terminal
npm run codegen

How to debug/fix tests

If you've run the tests locally and you want to see the results, Playwright has a UI mode which you can use to run and replay specific tests:

npm run test -- --ui

It will also record any failing tests when running npm run test in this folder.