Skip to content

Commit 1495a5d

Browse files
committed
Update shapes_test.js
* Check whether `Plotly.relayout()` can remove all the shapes.
1 parent 8fce07c commit 1495a5d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/jasmine/tests/shapes_test.js

+8
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,14 @@ describe('Test shapes:', function() {
187187
}).then(done);
188188
});
189189

190+
it('should be able to remove all shapes', function(done) {
191+
Plotly.relayout(gd, { shapes: [] }).then(function() {
192+
expect(countShapePathsInUpperLayer()).toEqual(0);
193+
expect(countShapePathsInLowerLayer()).toEqual(0);
194+
expect(countShapePathsInSubplots()).toEqual(0);
195+
}).then(done);
196+
});
197+
190198
it('should be able to update a shape layer', function(done) {
191199
var index = countShapes(gd),
192200
astr = 'shapes[' + index + ']',

0 commit comments

Comments
 (0)