Hi,
Whenever I change something insignificant in the code, the tests are green. If I test it again, the first tooltip test doesn’t pass. With the same code!
Sometimes I’m not passing the first tooltip test, sometimes I’m not passing the second one and sometimes it’s green. This must be about speed. Something with the date because those tests take up a lot of time
EM first tooltip is as follows :
Tooltip should be hidden when mouse is not on an area: expected false to be true
EM second tooltip is:
Tooltip’s “data-date” property should be equal to the active area’s “data-date” property: expected ‘1980-10-01’ to equal '1999-07-01
What is meant by ‘hidden’ ?
I did pass it at some point, but not all the time. It would go green once and then red again.
I’ve tried :
- appending and removing the tooltip (to a g element that contains all the rects): works but I pass the test sometimes
when mouse is (not) mousing over a rect - setting display of tooltip to inline / none : works but I don’t pass the test
- setting x and y to empty string / data attribute : works but I’m not passing the test
I’m out of ideas. As far as I can see, my bar chart works and I do not know why I’m not passing that first tooltip test. Here’s the link : https://codepen.io/Mientje/pen/WNGvjPW?editors=0110
By the way, I was using tspan elements to place gdp info underneath date but then I couldn’t pass both tooltip tests, so I’ve deleted all the fancy bits.
Thanks and greets,
Karin