Agent skill · supabase
studio-e2e-tests
Write and run Playwright E2E tests for Supabase Studio (e2e/studio).
What it needs
About 6k tokens when loaded.
What this skill does
E2E Studio Tests Run Playwright end-to-end tests for the Studio application. Running Tests Tests must be run from the e2e/studio directory: Run specific file Run with grep filter UI mode for debugging Environment Setup Tests auto-start Supabase local containers via web server config Self-hosted mode (ISPLATFORM=false) runs tests in parallel (3 workers) No manual setup needed for self-hosted tests Test File Structure Tests are in e2e/studio/features/.spec.ts Use custom test utility: import { test } from '../utils/test.js' Test fixtures provide page, ref, and other helpers Common Patterns Wait for elements with generous timeouts: Use serial mode for tests sharing database state: Writing Robust Selectors Selector priority (best to worst) 1. getByRole with accessible name - Most robust, tests accessibility 2. getByTestId - Stable, explicit test hooks 3. getByText with exact match - Good for unique text 4. locator with CSS - Use sparingly, more fragile Patterns to avoid XPath selectors - Fragile to DOM changes Parent traversal with locator('..') - Breaks when structure changes Broad filter({ hasText }) on generic elements - May match multiple elements Add accessible labels to components When a component lacks a good accessible name, add one in the source code: Then use it in tests: Narrowing search scope Scope selectors to specific containers to avoid matching wrong elements: Avoiding Race Conditions Set up API waiters BEFORE triggering actions. This is the most common source of flaky tests. Same rule applies before navigation: When an action triggers multiple API calls, wait for all of them: Waiting Strategies Playwright auto-waits for elements to be actionable — prefer this over manual timeouts. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills supabase/studio-e2e-tests--f92b29