If a user has hovercards disabled, when they right click a link
this will trigger another hover event which will reset dwellStartTime.
This means when a dwelledButAbandoned event fires shortly afterwards
the totalInteractionTime will not be correct.
To remedy this, the calculation of totalInteractionTime and
perceivedWait is moved into ext.popups.schemaPopups
Now that we can trigger events without logging to the server and
checking the total interaction time duration in two places,
let's always run the event and only check it once.
A `hover` event triggers the setting of a dwell start time
A `display` event triggers the setting of the perceivedWait value
* Both are reset on a dwelledButAbandoned.
Since dwellStartTime is controlled inside a single place, getMassageData
no longer needs to clear it.
The test "returns false if dwelledButAbandoned event without a dwellStartTime"
is removed as this should no longer be possible.
Bug: T147846
Change-Id: Ie5917ca86f0d0ab27f4cf507e6dfa2c271433c03
This adds two new events "display" and "hover" which are not
recorded back to the server. The benefits of having these events
is that they are important events in the lifecycle of a hovercard.
This allows us to debug trackSubscribe and ensure we see the behaviour
we expect to see and in a future patchset will allow us to use these
events to drive the calculation of interaction time in one single location
(Sneak preview:
https://gerrit.wikimedia.org/r/316481 to get a feel for the why.)
Change-Id: I58eefc29444179fd245cfd722093dedea19455e8