| Summary: | Make SWTBotTreeItem/TableItem doubleClick methods more realistic | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] SWTBot | Reporter: | Tim Moore <tmm-bugs.eclipse> | ||||||
| Component: | SWTBot | Assignee: | Project Inbox <swtbot-inbox> | ||||||
| Status: | NEW --- | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Tim Moore
Created attachment 209205 [details]
Patch for SWTBotTreeItem.doubleClick
Created attachment 209206 [details]
Patch which syserrs events from a Tree node
After applying the patch, double click on "Node 1" in the tree to syserr the events that are fired. This isn't a usable automated test, unfortunately.
In the case of SWTBotTableItem, there is no double click method, rather SWTBotTable.doubleClick(row, column) is available. This method invokes AbstractSWTBot.doubleClickXY(x, y). There are several issues with that method from the perspective of double clicking on a Table, and I would imagine other things too. In particular: * Only one mouse down/up cycle. * Firing of Selection before MouseDown. But I can't say for certain whether these should hold true for all uses of it in SWTBot? In any case I got the following events when double clicking on a Table (note, interestingly, that for a Table two Selection events are fired whereas for a Tree there was only one): MouseEnter MouseMove Activate FocusIn MouseDown Selection MouseUp MouseHover MouseDown Selection DefaultSelection MouseDoubleClick MouseUp MouseMove MouseMove MouseExit Deactivate FocusOut So, similarly to above I propose the following order for SWTBotTable.doubleClick(row, column): MouseEnter MouseMove Activate FocusIn MouseDown Selection MouseUp MouseDown Selection DefaultSelection MouseDoubleClick MouseUp MouseHover MouseMove MouseExit Deactivate FocusOut Possibly it would make sense to apply this ordering to AbstractSWTBot.doubleClickXY? |