@@ -261,7 +261,6 @@ describe('groupby', function() {
261261 } ) ;
262262 } ) ;
263263
264- // passes; maybe not for the good reasons (see fixme comments)
265264 it ( 'Plotly.plot should plot the transform traces' , function ( done ) {
266265 var data = Lib . extendDeep ( [ ] , mockData0 ) ;
267266
@@ -285,7 +284,6 @@ describe('groupby', function() {
285284 } ) ;
286285 } ) ;
287286
288- // passes; looks OK
289287 it ( 'Plotly.plot should plot the transform traces' , function ( done ) {
290288 var data = Lib . extendDeep ( [ ] , mockData1 ) ;
291289
@@ -306,7 +304,6 @@ describe('groupby', function() {
306304 } ) ;
307305 } ) ;
308306
309- // passes OK; see todo comments
310307 it ( 'Plotly.plot should plot the transform traces' , function ( done ) {
311308 var data = Lib . extendDeep ( [ ] , mockData2 ) ;
312309
@@ -317,18 +314,17 @@ describe('groupby', function() {
317314 expect ( gd . data [ 0 ] . x ) . toEqual ( [ 1 , - 1 , - 2 , 0 , 1 , 2 , 3 ] ) ;
318315 expect ( gd . data [ 0 ] . y ) . toEqual ( [ 1 , 2 , 3 , 1 , 2 , 3 , 1 ] ) ;
319316
320- expect ( gd . _fullData . length ) . toEqual ( 1 ) ; // todo: confirm this result is OK
317+ expect ( gd . _fullData . length ) . toEqual ( 1 ) ;
321318
322319 expect ( gd . _fullData [ 0 ] . x ) . toEqual ( [ 1 , - 1 , - 2 , 0 , 1 , 2 , 3 ] ) ;
323320 expect ( gd . _fullData [ 0 ] . y ) . toEqual ( [ 1 , 2 , 3 , 1 , 2 , 3 , 1 ] ) ;
324321
325- assertDims ( [ 7 ] ) ; // todo: confirm this result is OK
322+ assertDims ( [ 7 ] ) ;
326323
327324 done ( ) ;
328325 } ) ;
329326 } ) ;
330327
331- // passes OK; see todo comments
332328 it ( 'Plotly.plot should plot the transform traces' , function ( done ) {
333329 var data = Lib . extendDeep ( [ ] , mockData3 ) ;
334330
@@ -339,12 +335,12 @@ describe('groupby', function() {
339335 expect ( gd . data [ 0 ] . x ) . toEqual ( [ 1 , - 1 , - 2 , 0 , 1 , 2 , 3 ] ) ;
340336 expect ( gd . data [ 0 ] . y ) . toEqual ( [ 1 , 2 , 3 , 1 , 2 , 3 , 1 ] ) ;
341337
342- expect ( gd . _fullData . length ) . toEqual ( 1 ) ; // todo: confirm this result is OK
338+ expect ( gd . _fullData . length ) . toEqual ( 1 ) ;
343339
344340 expect ( gd . _fullData [ 0 ] . x ) . toEqual ( [ 1 , - 1 , - 2 , 0 , 1 , 2 , 3 ] ) ;
345341 expect ( gd . _fullData [ 0 ] . y ) . toEqual ( [ 1 , 2 , 3 , 1 , 2 , 3 , 1 ] ) ;
346342
347- assertDims ( [ 7 ] ) ; // todo: confirm this result is OK
343+ assertDims ( [ 7 ] ) ;
348344
349345 done ( ) ;
350346 } ) ;
@@ -354,7 +350,7 @@ describe('groupby', function() {
354350 describe ( 'grouping with basic, heterogenous and overridden attributes' , function ( ) {
355351 'use strict' ;
356352
357- afterEach ( destroyGraphDiv ) ;
353+ // afterEach(destroyGraphDiv);
358354
359355 function test ( mockData ) {
360356
@@ -453,8 +449,7 @@ describe('groupby', function() {
453449 color : 'darkred' , // general 'default' color
454450 line : {
455451 width : [ 4 , 2 , 4 , 2 , 2 , 3 , 3 ] ,
456- // a general, not overridden array will be interpreted per group
457- color : [ 'orange' , 'red' , 'green' , 'cyan' ]
452+ color : [ 'orange' , 'red' , 'green' , 'cyan' , 'magenta' , 'blue' , 'pink' ]
458453 }
459454 } ,
460455 line : { color : 'red' } ,
@@ -464,7 +459,7 @@ describe('groupby', function() {
464459 style : {
465460 a : { marker : { size : 30 } } ,
466461 // override general color:
467- b : { marker : { size : 15 , color : 'lightblue' } , line : { color : 'purple' } }
462+ b : { marker : { size : 15 , line : { color : 'yellow' } } , line : { color : 'purple' } }
468463 }
469464 } ]
470465 } ] ;
@@ -512,10 +507,17 @@ describe('groupby', function() {
512507 } ] ;
513508
514509 it ( '`data` preserves user supplied input but `gd._fullData` reflects the grouping' , test ( mockData1 ) ) ;
510+
515511 it ( 'passes with lots of attributes and heterogenous attrib presence' , test ( mockData2 ) ) ;
512+
516513 it ( 'passes with group styles partially overriding top level aesthetics' , test ( mockData3 ) ) ;
514+ expect ( gd . _fullData [ 0 ] . marker . line . color ) . toEqual ( [ 'orange' , 'red' , 'cyan' , 'pink' ] ) ;
515+ expect ( gd . _fullData [ 1 ] . marker . line . color ) . toEqual ( 'yellow' ) ;
516+
517517 it ( 'passes with no explicit styling for the individual group' , test ( mockData4 ) ) ;
518+
518519 it ( 'passes with no explicit styling in the group transform at all' , test ( mockData5 ) ) ;
520+
519521 it ( 'passes with no explicit styling in the group transform at all' , test ( mockData6 ) ) ;
520522
521523 } ) ;
0 commit comments