assertj / assertj/assertj-swing

Removing filtered components from children-collection due to "already-used"-list? (issue 223)

Aperta
#36 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
import from fest-swing Major New Feature
Lingua principale
Java
Stelle
121
Fork
52
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

_Issue by **[Alex Ruiz](http://jira.codehaus.org/secure/ViewProfile.jspa?name=alexruiz)** from Thu, 5 Mar 2009 13:29:16 -0600_
_Originally opened as http://jira.codehaus.org/browse/FEST-42_

---

Hi there,

We've been using a Swing-Component (in our case a JDialog/JCalendar) which we initialise only once in our application. This might be very interesting for fest-users that take care of performance issues during their tests.

Testing our application, we tried to use the Swing-Component twice, but FEST couldn't find the instance of our component in the moment we tried to use it the second time.

Debugging our test, we found out that there is that kind "disposed"-list, that removes the "child" of our application due to the second call.

We found something interesting in NewHierarchy.childrenOf(Component c):


Collection<Component> children = super.childrenOf(c);

children.removeAll(filter.filtered());

In our opinion, testers should be able to tell FEST to add a component to this kind of dispose-list, but this must not happen automatically.

Is there any point we missed or any other way out?

Creating a new Instance from our component on each request helped us out of this problem and might be some kind of workaround for us for the moment.

Best regards from Germany,

George


Original report: Issue 223 (Google Code)

---

votes (original issue): 0
watches (original issue): 0

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da NewHierarchy.childrenOf(Component c), in particolare dalla chiamata children.removeAll(filter.filtered()), e traccia come viene popolato l’elenco degli elementi già utilizzati o eliminati. Riproduci il caso in cui lo stesso Swing Component, JDialog o JCalendar venga richiesto due volte; il lavoro è completato quando il comportamento di filtraggio previsto è definito e il componente rimane individuabile quando dovrebbe esserlo.

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

Valutazione

Stack tecnologico
java
Ambito
desktop, testing
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.