robmayhew / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

JTreeFixture.selectPath(String) method does not expand child nodes #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a JTree with several nodes
2. Make some of the nodes in the tree collapsed
3. Invoke selectPath(String) method on the tree, trying to select a
collapsed path

What is the expected output? What do you see instead?
JTreeFixture.selectPath(String) method is expected to select path
regardless whether it is collapsed or expanded; instead, ComponentLookup
exception is thrown when trying to select collapsed path.

What version of the product are you using? On what operating system?
FEST-Swing 1.0b2.1, Microsoft Windows XP Professional

Please provide any additional information below.
Method works perfectly fine when the path to be selected is fully expanded.
According to JavaDocs, it should expand any collapsed nodes as it works
it's way though to the desired path

Original issue reported on code.google.com by arip...@gmail.com on 16 Dec 2008 at 7:34

GoogleCodeExporter commented 9 years ago
Can you please provide a test case? I cannot reproduce this bug. Please take a 
look
at the test case in http://code.google.com/p/fest/source/detail?r=2063 (r2063)

Although my test case was for another bug, I can see that FEST expands the 
parent
nodes when selecting a node.

Also, please try to reproduce this bug with release 1.0rc. This might have been 
fixed
already.

Thanks,
-Alex

Original comment by Alex.Rui...@gmail.com on 18 Dec 2008 at 1:59

GoogleCodeExporter commented 9 years ago
When I am trying to call "mainWindow.tree().selectPath(node1/node2/node3)" and 
node1
is not expanded, I get "locationUnabailableException" exception. However, when I
expand the nodes prior calling selectPath() method, everything seems to work 
fine. I
tried this on 1.0rc just now. Does it use names to expand parent nodes? I am 
asking
because none of my components have names.

Original comment by arip...@gmail.com on 18 Dec 2008 at 9:31

GoogleCodeExporter commented 9 years ago
"node1" is the actual text that the node is showing. Please let me know if that 
helped :)

-Alex

Original comment by Alex.Rui...@gmail.com on 18 Dec 2008 at 9:49

GoogleCodeExporter commented 9 years ago
I am sorry, it should have been 
"mainWindow.tree().selectPath("node1/node2/node3")",
with String passed to the selectPath() method. Forgot to put quotes in there:) 
The method works when my tree is fully expanded, i.e.:

node1
  \_ node2
       \_ node3

However, when node1 is collapsed, I get the exception.

Best regards,
Alex

Original comment by arip...@gmail.com on 18 Dec 2008 at 10:21

GoogleCodeExporter commented 9 years ago
Alex, can you please provide a test case? With the description you provided, I 
cannot
reproduce this issue.

Thanks!
-Alex

Original comment by Alex.Rui...@gmail.com on 18 Dec 2008 at 11:04

GoogleCodeExporter commented 9 years ago
I'm closing this issue till I get a test case to reproduce it.

Original comment by Alex.Rui...@gmail.com on 30 Dec 2008 at 10:18