(expectations, msg)
| 1614 | } |
| 1615 | |
| 1616 | function assertAnnotationsXY(expectations, msg) { |
| 1617 | var TOL = 2.5; |
| 1618 | var anns = d3SelectAll('g.annotation-text-g'); |
| 1619 | |
| 1620 | expect(anns.size()).toBe(expectations.length, msg); |
| 1621 | |
| 1622 | anns.each(function(_, i) { |
| 1623 | var ann = d3Select(this).select('g'); |
| 1624 | var translate = Drawing.getTranslate(ann); |
| 1625 | |
| 1626 | expect(translate.x).toBeWithin(expectations[i][0], TOL, msg + ' - ann ' + i + ' x'); |
| 1627 | expect(translate.y).toBeWithin(expectations[i][1], TOL, msg + ' - ann ' + i + ' y'); |
| 1628 | }); |
| 1629 | } |
| 1630 | |
| 1631 | // more robust (especially on CI) than update camera via mouse events |
| 1632 | function updateCamera(x, y, z) { |
no outgoing calls
no test coverage detected
searching dependent graphs…