The bundled @effect/ui testing example clicks a missing “Save now” button

Đang mở
#11,053 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

@effect-bot đang làm issue này rồi.

Từ ngày 29/11/2026.

  • #613 của @effect-bot — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
testing

Hướng nghiên cứu

Read ai-docs/src/10_ui/50_testing.ts around lines 544–553 and compare the example with fixtures/pages/notes/NotePage.ts and fixtures/notes/components/NoteEditor.ts. Run the reproduction command from the issue; changing the click target from “Save now” to “Save” should let the test pass, including the saved notice and hidden editor. An open linked pull request indicates work is already underway.

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

Mô tả

What is the type of issue?

Example code is not working

What is the issue?

The bundled App as a Play example fails when it tries to save an edited note. It should show Saved, then hide the editor when the test clicks Hide. Instead it stops at HtmlPlay.click: nothing matches text "Save now".

Reproduced on macOS arm64 with Node 24.22.3, using @effect/[email protected] from UI main at 77391ee50ae3d3175d670facbf675e9a819ba6a6. The @main and SHA-pinned downloads were byte-identical. Run in an empty directory:

cat > package.json <<'JSON'
{
  "private": true,
  "type": "module",
  "imports": {
    "#domain/*": "./fixtures/domain/*.ts",
    "#queries/*": "./fixtures/queries/*.ts"
  }
}
JSON
npm install --min-release-age=0 --ignore-scripts --no-audit --no-fund \
  [email protected] @effect/[email protected] [email protected] [email protected] \
  '@effect/ui@https://pkg.pr.new/Effect-TS/ui/@effect/ui@77391ee50ae3d3175d670facbf675e9a819ba6a6'
guide=node_modules/@effect/ui/ai-docs/src/10_ui
cp -R "$guide/fixtures" .
cp "$guide/50_testing.ts" upstream.test.ts
./node_modules/.bin/vitest run upstream.test.ts --retry 0 -t 'loads a note, saves an edit and shows the notice'

Changing only the click argument to Save passes the assertions for the Saved notice and the hidden editor.

Where did you find it?

ai-docs/src/10_ui/50_testing.ts:544–553 describes and clicks a summary-slot button that the fixture no longer renders. The summary has only the title, and the editor has a Save submit button. fixtures/pages/notes/NotePage.ts:63–73, fixtures/notes/components/NoteEditor.ts:194–197.

Ngôn ngữ chính
TypeScript
Star
16.7k
Fork
808
Merge trung bình
21 giờ 22 phút
Pull request đã merge (30 ngày)
486

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 Effect-TS/effect

Tất cả issue của Effect-TS/effect

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.