Skip to content

Commit 87de31f

Browse files
committed
groupby test for no style present
1 parent 9cafe1e commit 87de31f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/jasmine/tests/transform_groupby_test.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,33 @@ describe('groupby', function() {
459459
}]
460460
}];
461461

462+
var mockData4 = [{
463+
mode: 'markers+lines',
464+
x: [1, -1, -2, 0, 1, 2, 3],
465+
y: [0, 1, 2, 3, 5, 4, 6],
466+
transforms: [{
467+
type: 'groupby',
468+
groups: ['a', 'a', 'b', 'a', 'b', 'b', 'a'],
469+
style: {/* can be empty, or of partial group id coverage */}
470+
}]
471+
}];
472+
473+
var mockData5 = [{
474+
mode: 'markers+lines',
475+
x: [1, -1, -2, 0, 1, 2, 3],
476+
y: [0, 1, 2, 3, 5, 4, 6],
477+
transforms: [{
478+
type: 'groupby',
479+
groups: ['a', 'a', 'b', 'a', 'b', 'b', 'a']
480+
}]
481+
}];
482+
462483
// this passes OK as expected
463484
it('`data` preserves user supplied input but `gd._fullData` reflects the grouping', test(mockData1));
464485
it('passes with lots of attributes and heterogenous attrib presence', test(mockData2));
465486
it('passes with group styles partially overriding top level aesthetics', test(mockData3));
487+
it('passes with no explicit styling for the individual group', test(mockData4));
488+
it('passes with no explicit styling in the group transform at all', test(mockData5));
466489

467490
});
468491

0 commit comments

Comments
 (0)