8000 Plotly.update in update menus by etpinard · Pull Request #972 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Plotly.update in update menus #972

8000 New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 23, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: add check for updatemenu 'update' and 'animate' args
  • Loading branch information
etpinard committed Sep 22, 2016
commit 8db01102d5934927c43fea1d175e506af5fc2942
11 changes: 11 additions & 0 deletions test/jasmine/tests/updatemenus_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ describe('update menus defaults', function() {
buttons: [{
method: 'relayout',
args: ['title', 'Hello World']
}, {
method: 'update',
args: [ { 'marker.size': 20 }, { 'xaxis.range': [0, 10] }, [0, 1] ]
}, {
method: 'animate',
args: [ 'frame1', { transition: { duration: 500, ease: 'cubic-in-out' }}]
}]
}, {
bgcolor: 'red'
Expand All @@ -40,8 +46,13 @@ describe('update menus defaults', function() {

expect(layoutOut.updatemenus[0].visible).toBe(true);
expect(layoutOut.updatemenus[0].active).toEqual(0);
expect(layoutOut.updatemenus[0].buttons[0].args.length).toEqual(2);
expect(layoutOut.updatemenus[0].buttons[1].args.length).toEqual(3);
expect(layoutOut.updatemenus[0].buttons[2].args.length).toEqual(2);

expect(layoutOut.updatemenus[1].visible).toBe(false);
expect(layoutOut.updatemenus[1].active).toBeUndefined();

expect(layoutOut.updatemenus[2].visible).toBe(false);
expect(layoutOut.updatemenus[2].active).toBeUndefined();
});
Expand Down
0