(layoutCount, recty0)
| 259 | |
| 260 | it('makes a new shape or edits the existing one as necessary', function(done) { |
| 261 | function checkShapes(layoutCount, recty0) { |
| 262 | expect(gd.layout.shapes.length).toBe(layoutCount); |
| 263 | expect(gd._fullLayout.shapes.length).toBe(2); |
| 264 | var shapeElements = document.querySelectorAll('.shapelayer path[fill-rule=\'evenodd\']'); |
| 265 | var rectElement = shapeElements[1]; |
| 266 | expect(shapeElements.length).toBe(2); |
| 267 | |
| 268 | if(recty0) { |
| 269 | var rectItem = gd.layout.shapes[layoutCount - 1]; |
| 270 | expect(rectItem.templateitemname).toBe('outline'); |
| 271 | expect(rectItem.x0).toBeWithin(-0.15, 0.001); |
| 272 | expect(rectItem.y0).toBeWithin(recty0, 0.001); |
| 273 | expect(rectItem.x1).toBeWithin(1.2, 0.001); |
| 274 | expect(rectItem.y1).toBeWithin(1.1, 0.001); |
| 275 | } |
| 276 | |
| 277 | return rectElement; |
| 278 | } |
| 279 | |
| 280 | var rectDragger = checkShapes(1); |
| 281 |
no outgoing calls
no test coverage detected
searching dependent graphs…