(pos, text, msg)
| 1361 | |
| 1362 | it('should register clicks and show hover effects on the text box only', function(done) { |
| 1363 | function assertHoverLabel(pos, text, msg) { |
| 1364 | return new Promise(function(resolve) { |
| 1365 | mouseEvent('mousemove', pos[0], pos[1]); |
| 1366 | mouseEvent('mouseover', pos[0], pos[1]); |
| 1367 | |
| 1368 | setTimeout(function() { |
| 1369 | var hoverText = d3SelectAll('g.hovertext'); |
| 1370 | expect(hoverText.size()).toEqual(text ? 1 : 0, msg); |
| 1371 | |
| 1372 | if(text && hoverText.size()) { |
| 1373 | expect(hoverText.text()).toEqual(text, msg); |
| 1374 | } |
| 1375 | |
| 1376 | mouseEvent('mouseout', pos[0], pos[1]); |
| 1377 | mouseEvent('mousemove', 0, 0); |
| 1378 | |
| 1379 | setTimeout(resolve, HOVERMINTIME * 1.1); |
| 1380 | }, HOVERMINTIME * 1.1); |
| 1381 | }); |
| 1382 | } |
| 1383 | |
| 1384 | function assertHoverLabels(spec, msg) { |
| 1385 | // spec is an array of [pos, text] |
no test coverage detected
searching dependent graphs…