File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -469,6 +469,33 @@ describe('update menus interactions', function() {
469
469
} ) . catch ( fail ) . then ( done ) ;
470
470
} ) ;
471
471
472
+ it ( 'should still emit the event if method = skip' , function ( done ) {
473
+ var clickCnt = 0 ;
474
+ var data = [ ] ;
475
+ gd . on ( 'plotly_buttonclicked' , function ( datum ) {
476
+ data . push ( datum ) ;
477
+ clickCnt ++ ;
478
+ } ) ;
479
+
480
+ Plotly . relayout ( gd , {
481
+ 'updatemenus[0].buttons[0].method' : 'skip' ,
482
+ 'updatemenus[0].buttons[1].method' : 'skip' ,
483
+ 'updatemenus[0].buttons[2].method' : 'skip' ,
484
+ 'updatemenus[1].buttons[0].method' : 'skip' ,
485
+ 'updatemenus[1].buttons[1].method' : 'skip' ,
486
+ 'updatemenus[1].buttons[2].method' : 'skip' ,
487
+ 'updatemenus[1].buttons[3].method' : 'skip' ,
488
+ } ) . then ( function ( ) {
489
+ click ( selectHeader ( 0 ) ) . then ( function ( ) {
490
+ expect ( clickCnt ) . toEqual ( 0 ) ;
491
+
492
+ return click ( selectButton ( 2 ) ) ;
493
+ } ) . then ( function ( ) {
494
+ expect ( clickCnt ) . toEqual ( 1 ) ;
495
+ } ) . catch ( fail ) . then ( done ) ;
496
+ } ) ;
497
+ } ) ;
498
+
472
499
it ( 'should apply update on button click' , function ( done ) {
473
500
var header0 = selectHeader ( 0 ) ,
474
501
header1 = selectHeader ( 1 ) ;
You can’t perform that action at this time.
0 commit comments