Description
AS A Developer
I WANT the tool-tip position to be repositioned in the viewport when hidden
SO THAT IT will always display to the user in the viewport browser window.
Acceptance Criteria
Scenario 1: Mettle-tool-tip text is positioned to the corner of a page
Given the tool-tip text is position at the upper left corner
And the data-position
is set to left
When the user hovers over the text
And the tool-tip appears
Then the tool-tip should display on the right
And fully appear in the browser viewport
Scenario 2: Mettle-tool-tip text is positioned to the corner of a page
Given the tool-tip text is position at the upper left corner
And the data-position
is set to top
When the user hovers over the text
And the tool-tip appears
Then the tool-tip should display on the bottom
And fully appear in the browser viewport
Scenario 3: Mettle-tool-tip text is positioned with no viewport
Given the tool-tip text is position at the center with no surrounding viewport
And the data-position
is set to the default
When the user hovers over the text
And the tool-tip appears
Then the tool-tip should display on the left
And possibly appear in the browser viewport
SCOPE CLARIFICATION
This enhancement should not add any data-position
options
Additional context
If set to left and outside the viewport, then it will be set to right. If set to top and outside the view port then it will be set to bottom.