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 cbd2e7d

Browse filesBrowse files
committed
Add test for placing animate on main queue
1 parent be9bcb6 commit cbd2e7d
Copy full SHA for cbd2e7d

File tree

1 file changed

+26
-0
lines changed
Filter options

1 file changed

+26
-0
lines changed

‎test/jasmine/tests/animate_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/animate_test.js
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,4 +768,30 @@ describe('animating scatter traces', function() {
768768
expect(trace.style('opacity')).toEqual('0.1');
769769
}).catch(fail).then(done);
770770
});
771+
772+
it('places animate on the main plotly.js queue', function(done) {
773+
Plotly.plot(gd, [{
774+
x: [1, 2, 3],
775+
y: [4, 5, 6],
776+
opacity: 1
777+
}]).then(function() {
778+
gd._promises.push(delay(100)());
779+
var checked = false;
780+
781+
Plotly.animate(gd, [{
782+
data: [{'line.color': 'red'}]
783+
}], {
784+
frame: {duration: 0, redraw: false},
785+
mode: 'immediate'
786+
}).then(function() {
787+
expect(gd._fullData[0].line.color).toBe('red');
788+
expect(checked).toBe(true);
789+
}).catch(fail).then(done);
790+
791+
setTimeout(function() {
792+
expect(gd._fullData[0].line.color).not.toBe('red');
793+
checked = true;
794+
}, 50);
795+
}).catch(fail);
796+
});
771797
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.