Commit graph

3 commits

Author SHA1 Message Date
Uli Schlachter
07d0bcb713 Stabilize awful.tooltip code coverage (#1773)
For a while now we had our code coverage tools tell us that the coverage
for one line of code fluctuated. Sometimes it was being executed and
other times it was not. This is useless noise.

I think what is happening here is that the coverage depends on the order
of iteration over a table. Either the tooltip that is being created was
first made visible and then it text changed, or things happened in the
opposite order.

Fix this by doing this by explicitly changing the tooltip's text while
it is surely visible.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-07 18:00:22 +02:00
Uli Schlachter
61d8d74421 Fix test-tooltip.lua: Run the event loop
This test changes the mouse cursor's position and afterwards has an
assert that checks something on the tooltip. This really looks a lot
like it expects the mouse cursor's position to be already updated and
its enter and leave events to be handled. However, this is now how
things actually work.

Fix this by moving the assert into its own step, so that in between the
normal main loop runs.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-09-30 09:36:47 +02:00
Emmanuel Lepage Vallee
4aada37682 tests: Test tooltips 2016-08-20 16:21:48 -04:00