(content, didBBoxChanged)
| 452 | var lastBBox; |
| 453 | |
| 454 | function assertTitle(content, didBBoxChanged) { |
| 455 | var radialAxisTitle = d3Select('g.g-polartitle'); |
| 456 | var txt = radialAxisTitle.select('text'); |
| 457 | var bb = radialAxisTitle.node().getBBox(); |
| 458 | var newBBox = [bb.x, bb.y, bb.width, bb.height]; |
| 459 | |
| 460 | if(content === '') { |
| 461 | expect(txt.size()).toBe(0, 'cleared <text>'); |
| 462 | } else { |
| 463 | expect(txt.text()).toBe(content, 'radial axis title'); |
| 464 | } |
| 465 | |
| 466 | negateIf(didBBoxChanged, expect(newBBox)).toEqual(lastBBox, 'did bbox change'); |
| 467 | lastBBox = newBBox; |
| 468 | } |
| 469 | |
| 470 | Plotly.newPlot(gd, [{ |
| 471 | type: 'scatterpolar', |
no test coverage detected
searching dependent graphs…