isEnabled() bug on ToolItems?

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

isEnabled() bug on ToolItems?

Postby MercyBeat » Mon Nov 02, 2009 8:15 am

We are creating ToolItems
Code: Select all
        ToolItem toolItem = new ToolItem(parentToolBar, SWT.PUSH);
        toolItem.setToolTipText(toolTipText);
        toolItem.setImage(image);
        toolItem.setEnabled(true);
        toolItem.setData("name", toolTipText);


When we test the ToolItem to see if the Button is enabled it always returns false.

Code: Select all
        NamedWidgetLocator sendButtonLocated = new NamedWidgetLocator(TOOL_TIP_TEXT);
        ui.assertThat(sendButtonLocated.isEnabled());


When the ToolItem is enabled it displays the Image in color. When it is not enabled it shows the gray Image.

Is there a different way to test this state?
MercyBeat
 
Posts: 2
Joined: Mon Nov 02, 2009 6:54 am

Re: isEnabled() bug on ToolItems?

Postby Phil Quitslund » Mon Nov 02, 2009 9:06 am

What version of WindowTester are you using?
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: isEnabled() bug on ToolItems?

Postby MercyBeat » Mon Nov 02, 2009 9:16 am

4.0 downloaded Friday afternoon because we were hoping it would work with the latest and greatest.
MercyBeat
 
Posts: 2
Joined: Mon Nov 02, 2009 6:54 am

Re: isEnabled() bug on ToolItems?

Postby Phil Quitslund » Mon Nov 02, 2009 4:14 pm

Looking into this a bit deeper it looks like there was a bug in how we tested enablement on named tool items. Thanks for the catch! We have this fixed now and intend to push out a beta release with the fix in the next week.

Again, thanks!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest