Allow a wildcard index in WicketTester component paths

Đang mở
#1,956 1 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

@affan-ch đang làm issue này rồi.

Từ ngày 20/11/2026.

  • #1974 của @affan-ch — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
testing

Hướng nghiên cứu

Start with wicket-tester/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java, especially assertLabel and getComponentFromLastRenderedPage, then inspect the tests under wicket-core-tests/src/test/java/org/apache/wicket/util/tester/. First clarify the scope, wildcard character, and behavior when multiple rows match in an issue comment. Done means the agreed path behavior has tests and the public API has Javadoc and an @since tag.

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

Mô tả

good first issue

To check a cell of a table or a row of a list view, a test has to know the exact row index:

tester.assertLabel("table:rows:1:cells:2", "MyCell");

When the test only cares that some row contains the value, a wildcard index would make it independent of ordering:

tester.assertLabel("table:rows:?:cells:2", "MyCell");

Where

wicket-tester/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java, assertLabel and the methods that resolve a path to a component (getComponentFromLastRenderedPage). WicketTester is shipped to applications, so new behaviour is public API and needs Javadoc and an @since.

Done when

  • Agree in a comment on the scope first: only assertLabel, or every assertion that takes a path; which character (? or *, and whether either can occur in a real component id); and what "matches" means when several rows match.
  • Tests in wicket-core-tests/src/test/java/org/apache/wicket/util/tester/.

Background

Originally requested as WICKET-6488.


Part of #1945. This issue is meant for a first contribution to Wicket. To work on it, leave a comment so others know; a claim without a pull request lapses after two weeks. Questions are welcome, here on the issue or on [email protected]. Start your branch from master, and see Send a pull request to Wicket for building and testing.

Ngôn ngữ chính
Java
Star
800
Fork
437
Merge trung bình
21 giờ 36 phút
Pull request đã merge (30 ngày)
167

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 apache/wicket

Tất cả issue của apache/wicket

Issue tương tự

Thêm issue về Java

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.