Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11326 (closed)

Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

Bug: Automated GUI testing of Insight with SwingLibrary has surprising failure in popup menu

Reported by: mtbcarroll Owned by: mtbcarroll
Priority: minor Milestone: Testing and Docs
Component: General Version: 4.4.8
Keywords: n.a. Cc: ux@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: Testing and Docs (2)

Description

#11210 includes (albeit in a spread-out way) instructions for running a simple first test case on Insight with Robot Framework. There is a bad surprise: if we add a test to the end of the test-11214.rest attached to that ticket, to test which popup menu items on Orphaned Images are enabled, then there is an unexpected failure, shown by the attached log. The comments on #11210 include some initial investigation of this, but progress on that ticket will now move beyond this specific issue.

The source for SwingLibrary, Robot Framework, even Swing itself, is all available and quite readable, and the failure is easily reproduced, so this problem should certainly be solvable, but I am separating it out to its own narrow ticket because I don't want it to stop me doing other work on #11210 right now. Anybody should feel free to pick this one up.

Attachments (2)

log.html (190.5 KB) - added by mtbcarroll 11 years ago.
execution log of failing script
test-popup-enabled.rest (3.0 KB) - added by mtbcarroll 11 years ago.
minimal test case

Download all attachments as: .zip

Change History (14)

comment:1 Changed 11 years ago by mtbcarroll

  • Summary changed from Automated GUI testing of Insight with SwingLibrary has surprising failure in popup menu to Bug: Automated GUI testing of Insight with SwingLibrary has surprising failure in popup menu

comment:2 Changed 11 years ago by mtbcarroll

In testing fixes to this perhaps add a test case for https://www.openmicroscopy.org/qa2/qa/feedback/7552/ viz.

When I select multiple images in the central panel using either the shift or command keys, I can later access a number of options using the right mouse button's contextual menu (eg set min/max)
However, if I select the same images by dragging a square around them, some of these options are not available.

Last edited 11 years ago by mtbcarroll (previous) (diff)

Changed 11 years ago by mtbcarroll

execution log of failing script

Changed 11 years ago by mtbcarroll

minimal test case

comment:3 Changed 11 years ago by mtbcarroll

  • Owner set to mtbcarroll
  • Status changed from new to accepted

What is enabled on context menus is an issue that Gus has been flagging as discrepancy between Insight and Web. So, between that and #11214, I should have another crack at this bug and hope that my luck is better this time.

comment:4 Changed 11 years ago by mtbcarroll

Okay, here's an interesting thing: the popup menu created and shown by Insight is a org.openmicroscopy.shoola.agents.treeviewer.view.PopupMenu with a BevelBorder but the one found by Abbot is a javax.swing.JPopupMenu with an AquaMenuBorder.

comment:5 Changed 11 years ago by mtbcarroll

The invoker of the Insight popup menu is the DnDTree but the invoker of the one found by Abbot is a JMenu.

comment:6 Changed 11 years ago by mtbcarroll

Abbot does find the DnDTree; I wonder if AWTHierarchy.getComponents has a way to find the popup menu invoked by it.

comment:7 Changed 11 years ago by mtbcarroll

  • Owner changed from mtbcarroll to jburel

Ah, it looks like AWTHierarchy.getComponents is finding only varieties of TreeCellRenderer under the DnDTree. I wonder where that other popup menu is coming from then.

JM, do you want to have a look at this issue? You might take a different line of enquiry that is rather more rapidly productive than mine seem to have been.

comment:8 Changed 11 years ago by mtbcarroll

  • Owner changed from jburel to mtbcarroll

I have figured this out. The JMenuItemMatcher in Abbot matches either the path to the menu item or, crucially, just the text of the item itself. Despite my attempt to set the context to the tree viewer's BrowserUI panel the matcher was picking up the File|Import... from the main toolbar instead of the Import... I intended from the popup menu. This, I can devise a fix for.

comment:9 Changed 11 years ago by mtbcarroll

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed by https://github.com/mtbc/openmicroscopy/commit/55351304738ceb5ec09906557c6335d8ee4b63e1 but will need a little extra work for testing submenus of popup menus.

comment:11 Changed 11 years ago by Jean-Marie Burel <j.burel@…>

  • Remaining Time set to 0

(In [ffa06dbd08ecefde6923f9d4ca19e61784f5847e/ome.git] on branch develop) fix #11326 to address #11214: popup menu items enabled

comment:12 Changed 10 years ago by Jean-Marie Burel <j.burel@…>

(In [a111201a1140c0c83517343e9899d7be5090b9fd/ome.git]on branches master, dev_4_4) fix #11326 to address #11214: popup menu items enabled

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.69643 sec.)

We're Hiring!