Skip to content

Commit f8dbdd1

Browse files
committed
Update shapes test
* Count number of shape layers after relayout.
1 parent 22d7248 commit f8dbdd1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/jasmine/tests/shapes_test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ describe('Test shapes:', function() {
7979
var shape = getRandomShape();
8080

8181
Plotly.relayout(gd, 'shapes[' + index + ']', shape).then(function() {
82+
expect(countShapeLayers()).toEqual(1);
8283
expect(getLastShape(gd)).toEqual(shape);
8384
expect(countShapes(gd)).toEqual(index + 1);
8485
}).then(done);
@@ -89,11 +90,13 @@ describe('Test shapes:', function() {
8990
var shape = getRandomShape();
9091

9192
Plotly.relayout(gd, 'shapes[' + index + ']', shape).then(function() {
93+
expect(countShapeLayers()).toEqual(1);
9294
expect(getLastShape(gd)).toEqual(shape);
9395
expect(countShapes(gd)).toEqual(index + 1);
9496
}).then(function() {
9597
Plotly.relayout(gd, 'shapes[' + index + ']', 'remove');
9698
}).then(function() {
99+
expect(countShapeLayers()).toEqual(1);
97100
expect(countShapes(gd)).toEqual(index);
98101
}).then(done);
99102
});

0 commit comments

Comments
 (0)