Allow a wildcard index in WicketTester component paths

Abierto
#1,956 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@affan-ch ya está trabajando en esto.

Desde el 20/11/2026.

  • #1974 de @affan-ch — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java
Área
testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
800
Forks
437
Merge medio
21 h 36 min
PR fusionados (30 d)
167

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/wicket

Todos los issues de apache/wicket

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.