File tree 1 file changed +6
-13
lines changed
1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -826,7 +826,7 @@ describe('update menus interaction with other components:', function() {
826
826
827
827
afterEach ( destroyGraphDiv ) ;
828
828
829
- it ( 'buttons show be drawn above sliders' , function ( done ) {
829
+ it ( 'draws buttons above sliders' , function ( done ) {
830
830
831
831
Plotly . plot ( createGraphDiv ( ) , [ {
832
832
x : [ 1 , 2 , 3 ] ,
@@ -869,19 +869,12 @@ describe('update menus interaction with other components:', function() {
869
869
} )
870
870
. then ( function ( ) {
871
871
var infoLayer = d3 . select ( 'g.infolayer' ) ;
872
- var containerClassNames = [ 'slider-container' , 'updatemenu-container' ] ;
873
- var list = [ ] ;
874
-
875
- infoLayer . selectAll ( '*' ) . each ( function ( ) {
876
- var className = d3 . select ( this ) . attr ( 'class' ) ;
877
-
878
- if ( containerClassNames . indexOf ( className ) !== - 1 ) {
879
- list . push ( className ) ;
880
- }
881
- } ) ;
882
-
883
- expect ( list ) . toEqual ( containerClassNames ) ;
872
+ var menuLayer = d3 . select ( 'g.menulayer' ) ;
873
+ expect ( infoLayer . selectAll ( '.slider-container' ) . size ( ) ) . toBe ( 1 ) ;
874
+ expect ( menuLayer . selectAll ( '.updatemenu-container' ) . size ( ) ) . toBe ( 1 ) ;
875
+ expect ( infoLayer . node ( ) . nextSibling ) . toBe ( menuLayer . node ( ) ) ;
884
876
} )
877
+ . catch ( fail )
885
878
. then ( done ) ;
886
879
} ) ;
887
880
} ) ;
You can’t perform that action at this time.
0 commit comments