(expected)
| 227 | var dflt = constants.layerNames; |
| 228 | |
| 229 | function _assert(expected) { |
| 230 | var actual = d3SelectAll('g.polar > .polarsublayer'); |
| 231 | |
| 232 | expect(actual.size()).toBe(expected.length, '# of layer'); |
| 233 | |
| 234 | actual.each(function(d, i) { |
| 235 | var className = d3Select(this) |
| 236 | .attr('class') |
| 237 | .split('polarsublayer ')[1]; |
| 238 | |
| 239 | expect(className).toBe(expected[i], 'layer ' + i); |
| 240 | }); |
| 241 | } |
| 242 | |
| 243 | Plotly.newPlot(gd, fig).then(function() { |
| 244 | _assert(dflt); |
no test coverage detected
searching dependent graphs…