Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 472854

Summary: [Hover] Create test suite for tooltips
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: EditorAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, libingw, Michael_Rennie
Version: 9.0   
Target Milestone: 11.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Curtis Windatt CLA 2015-07-16 11:54:33 EDT
We continue to find regressions in the tooltips as other aspects of the editor change.  We need some tests to try and catch these regressions earlier.

1) Tooltip placement/sizing

Either creating an iframe and opening the tooltip or simply testing the logic in computeTooltipArea.

2) Tooltip lifecycle

Tooltips can be created from hovers, content assist, and rulers.  We should test that the tooltip is created/placed/sized/hidden correctly as events occur.

3) Hover API

We have an API to allow new hovers to be contributed.  We should have tests for this API contract.
Comment 1 Curtis Windatt CLA 2015-11-23 14:13:56 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=d592a2dc8e9b2042946e611917a730456526f618
Created an initial test suite that creates a text view in the page and opens tooltips.  The text cases look way more complicated than they need to be because Internet Explorer creates divs and other elements at floating point sizes (i.e. height: 499.99997, width: 397.45623).

Implemented:
- show/hide API
- positioning around fixed anchor
- default height/width
- max width/height

To do:
- maxWidth/Height while positioned around an anchor
- update() onHover API
- fixed tooltip position

I already found one issue, bug 482852 from the tests.  I noticed that there is no check that a set position anchor or tooltip is withing the editor view.  I don't think this should be considered a bug though (allows us to use editor tooltips on the navigator for example).
Comment 2 Curtis Windatt CLA 2015-11-30 15:59:21 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=a6811ad7c90e783afbe1e35a6d57beaca5273893
Added more tests

While there are more possible cases, this gives us a good check against regressions in the tooltip API and sizing calculations.  Marking as FIXED.