File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -511,6 +511,32 @@ describe('Test carpet interactions:', function() {
511511 . catch ( fail )
512512 . then ( done ) ;
513513 } ) ;
514+
515+ it ( 'scattercarpet should be able to coexist with scatter traces' , function ( done ) {
516+ var mock = Lib . extendDeep ( { } , require ( '@mocks/scattercarpet.json' ) ) ;
517+
518+ function _assert ( exp ) {
519+ expect ( d3 . selectAll ( '.point' ) . size ( ) )
520+ . toBe ( exp , 'number of scatter pts on graph' ) ;
521+ }
522+
523+ Plotly . newPlot ( gd , mock ) . then ( function ( ) {
524+ _assert ( 12 ) ;
525+
526+ return Plotly . addTraces ( gd , {
527+ y : [ 1 , 2 , 1 ]
528+ } ) ;
529+ } )
530+ . then ( function ( ) {
531+ _assert ( 15 ) ;
532+ return Plotly . deleteTraces ( gd , [ 0 ] ) ;
533+ } )
534+ . then ( function ( ) {
535+ _assert ( 3 ) ;
536+ } )
537+ . catch ( fail )
538+ . then ( done ) ;
539+ } ) ;
514540} ) ;
515541
516542describe ( 'scattercarpet array attributes' , function ( ) {
You can’t perform that action at this time.
0 commit comments