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

Đang mở Phù hợp với người mới
#247 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, sql, supabase
Lĩnh vực
databases, testing

Hướng nghiên cứu

Mở supabase/tests/database/15_project_pages.test.sql và đọc test 6 quanh dòng 107, nơi is_empty kiểm tra toàn bộ bảng public.project_pages. Ghi nhận các id dự án fixture được tạo trước đó trong cùng tệp, rồi thu hẹp truy vấn con bằng where project_id in (...) chỉ trên những id đó. Chạy supabase test db supabase/tests/database/15_project_pages.test.sql với một cơ sở dữ liệu cục bộ đã có một trang — hoàn tất khi test 6 chạy qua ở đó và vẫn thất bại nếu một dự án fixture nhận được một trang một cách sai.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
1
Fork
1
Merge trung bình
6 giờ 56 phút
Pull request đã merge (30 ngày)
136

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eddiejaoude/StackDash

Tất cả issue của eddiejaoude/StackDash

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.