assertj / assertj/assertj-swing

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

Offen
#36 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
import from fest-swing Major New Feature
Vorherrschende Sprache
Java
Sterne
121
Forks
52
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

_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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit NewHierarchy.childrenOf(Component c), insbesondere mit dem Aufruf children.removeAll(filter.filtered()), und verfolge, wie die Liste der bereits verwendeten oder verworfenen Elemente befüllt wird. Reproduziere den Fall, in dem dieselbe Swing Component, JDialog oder JCalendar zweimal angefordert wird; abgeschlossen ist die Aufgabe, wenn das beabsichtigte Filterverhalten definiert ist und die Component auffindbar bleibt, wenn sie es sein sollte.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
desktop, testing
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.