Skip to content

test(studio): add db utils for checking database state#1202

Closed
everettbu wants to merge 2 commits into
masterfrom
charis/test/db-utils
Closed

test(studio): add db utils for checking database state#1202
everettbu wants to merge 2 commits into
masterfrom
charis/test/db-utils

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of supabase/supabase#42533
Original author: charislam


I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

Test utilities

What is the current behavior?

E2E tests that need to verify database state go through the SQL Editor, which is unnecessarily slow and prone to future breakage.

What is the new behavior?

Adds shared db utils for checking database state in Studio E2E tests by querying the database directly. Refactors API access tests to use the new utilities.

Additional context

Summary by CodeRabbit

  • Tests
    • Refactored API access privilege verification to use direct database queries instead of SQL editor interaction.
    • Added database utility functions for e2e tests to query table existence and access privileges.
    • Updated test signatures to simplify privilege verification calls.

@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  97 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  103 tests across 16 suites
duration  8 minutes, 26 seconds
commit  351aa52

Flaky tests

Features › rls-policies.spec.ts › RLS Policies › Create RLS Policy › should create a SELECT policy successfully

Skipped tests

Features › assistant.spec.ts › AI Assistant › Can send a message to the assistant and receive a response
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@everettbu

Copy link
Copy Markdown
Author

Upstream PR was closed or merged. Code is synced via branch mirror.

@everettbu everettbu closed this Feb 5, 2026
@everettbu everettbu deleted the charis/test/db-utils branch February 5, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants