FEST

JTreeDriver: drop() fails when root tree not visible

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: FEST-Swing 1.2a3
  • Fix Version/s: FEST-Swing 1.2a4
  • Component/s: Swing
  • Labels:
    None
  • Environment:
    Windows, JRE 1.5
  • Number of attachments :
    0

Description

When testing Drag & Drop operations on a tree with setRootVisible(false), the Method JTreeDriver.drop(JTree, String) fails.

Specifically, scrollToMatchingPath(JTree, String, JTreePathFinder, JTreeLocation) uses findMatchingPath without addRootIfInvisble. getPathBounds then seems to return null, leading to a NullPointerException in scrollRectToVisible.

I hope I am not wrong

Activity

Hide
Alex Ruiz added a comment -

Hi Pavol,

I couldn't reproduce the bug with the latest version (1.2a4 SNAPSHOT.) It may have been fixed already (a side effect of fixing another bug.)

Show
Alex Ruiz added a comment - Hi Pavol, I couldn't reproduce the bug with the latest version (1.2a4 SNAPSHOT.) It may have been fixed already (a side effect of fixing another bug.)
Hide
Alex Ruiz added a comment -

Please take a look at the method should_drag_and_drop_when_root_is_invisible in JTreeDriver_dragPath_dropPath_Test

Show
Alex Ruiz added a comment - Please take a look at the method should_drag_and_drop_when_root_is_invisible in JTreeDriver_dragPath_dropPath_Test
Hide
Alex Ruiz added a comment -

My bad, the test verifies drag but not drop. I'm reopening the bug.

Show
Alex Ruiz added a comment - My bad, the test verifies drag but not drop. I'm reopening the bug.
Hide
Alex Ruiz added a comment -

Now it's fixed for real

Show
Alex Ruiz added a comment - Now it's fixed for real

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: