Allow a wildcard index in WicketTester component paths

Aperta
#1,956 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@affan-ch ci sta già lavorando.

Dal 20/11/2026.

  • #1974 di @affan-ch — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java
Ambito
testing

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
Java
Stelle
800
Fork
437
Merge medio
21h 36m
PR unite (30g)
167

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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

Tutte le issue di apache/wicket

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.