Project pages database test fails when the local database already has a page

Aperta Adatta ai principianti
#247 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
postgresql, sql, supabase
Ambito
databases, testing

Direzione di ricerca

Apri supabase/tests/database/15_project_pages.test.sql e leggi il test 6 intorno alla riga 107, dove is_empty controlla l'intera tabella public.project_pages. Nota gli id di progetto fixture creati prima nello stesso file, poi restringi la sottoquery con where project_id in (...) a soli quegli id. Esegui supabase test db supabase/tests/database/15_project_pages.test.sql contro un database locale che ha già una pagina — fatto quando il test 6 passa lì e continua a fallire se un progetto fixture ottiene erroneamente una pagina.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: ci bug impact: low priority: P3 size: XS

Summary

supabase/tests/database/15_project_pages.test.sql test 6 asserts that public.project_pages is empty across the whole table (line 107: select is_empty($$ select project_id from public.project_pages $$, ...)). On a local database where someone has turned on a project page, the table already holds a row, so the test fails even though nothing is wrong:

# Failed test 6: "project_pages: creating projects creates no page"
#     Unexpected records:
#         (af80a27a-901c-495b-aa74-9e4bb1d9836e)

Reproduced at d831c95 (integration/demo-2026-11) with supabase test db supabase/tests/database/15_project_pages.test.sql against the shared local stack. Found while working on #245; the file is untouched there.

Fix

Scope the assertion to the projects the test creates (where project_id in (...) with its fixture ids), so it proves the rule without depending on the rest of the database. CI is unaffected today only because it starts from an empty database.

Acceptance criteria

  • Test 6 passes on a local database that already has project pages, and still fails if creating the fixture projects creates a page.

Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown

Lingua principale
TypeScript
Stelle
1
Fork
1
Merge medio
6h 56m
PR unite (30g)
136

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eddiejaoude/StackDash

Tutte le issue di eddiejaoude/StackDash

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.