(msg, exp)
| 2198 | |
| 2199 | it('hovermode:x common label should fit in the graph div width', function (done) { |
| 2200 | function _assert(msg, exp) { |
| 2201 | return function () { |
| 2202 | var label = d3Select('g.axistext'); |
| 2203 | if (label.node()) { |
| 2204 | expect(label.text()).toBe(exp.txt, 'common label text| ' + msg); |
| 2205 | expect(Drawing.getTranslate(label).x).toBeWithin(exp.lx, 5, 'common label translate-x| ' + msg); |
| 2206 | |
| 2207 | var startOfPath = label.select('path').attr('d').split('L')[0]; |
| 2208 | expect(startOfPath).not.toBe('M0,0', 'offset start of label path| ' + msg); |
| 2209 | } else { |
| 2210 | fail('fail to generate common hover label'); |
| 2211 | } |
| 2212 | }; |
| 2213 | } |
| 2214 | |
| 2215 | function _hoverLeft() { |
| 2216 | return _hover(gd, 30, 300); |
no test coverage detected
searching dependent graphs…