Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f8dbdd1

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

File tree

1 file changed

+3
-0
lines changed
Filter options

1 file changed

+3
-0
lines changed

‎test/jasmine/tests/shapes_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/shapes_test.js
+3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.