Skip to content

Commit

Permalink
test: fix failing tests from theme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme committed Sep 27, 2023
1 parent b343f0d commit c5882f4
Show file tree
Hide file tree
Showing 9 changed files with 485 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { createStore, Store } from 'redux';

import { partitionMultiGeometries } from './geometries';
import { createOnElementClickCaller } from './on_element_click_caller';
import { GOLDEN_RATIO } from '../../../../common/constants';
import { Predicate } from '../../../../common/predicate';
import { MockGlobalSpec, MockSeriesSpec } from '../../../../mocks/specs';
import { SettingsSpec, GroupBySpec, SmallMultiplesSpec } from '../../../../specs';
Expand Down Expand Up @@ -206,6 +207,11 @@ describe('Picked shapes selector', () => {
const onClickListener = jest.fn();
addSeries(store, sunburstSpec, {
onElementClick: onClickListener,
theme: {
partition: {
outerSizeRatio: 1 / GOLDEN_RATIO,
},
},
});
const geometries = partitionMultiGeometries(store.getState())[0];
expect(geometries?.quadViewModel).toHaveLength(6);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`Rendering points - areas Multi series area chart - linear can render fi
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -39,7 +39,7 @@ exports[`Rendering points - areas Multi series area chart - linear can render fi
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -68,7 +68,7 @@ exports[`Rendering points - areas Multi series area chart - linear can render fi
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -96,7 +96,7 @@ exports[`Rendering points - areas Multi series area chart - linear can render fi
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -130,7 +130,7 @@ exports[`Rendering points - areas Multi series area chart - linear can render se
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_2}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -158,7 +158,7 @@ exports[`Rendering points - areas Multi series area chart - linear can render se
255,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -187,7 +187,7 @@ exports[`Rendering points - areas Multi series area chart - linear can render se
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_2}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -215,7 +215,7 @@ exports[`Rendering points - areas Multi series area chart - linear can render se
255,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -249,7 +249,7 @@ exports[`Rendering points - areas Multi series area chart - ordinal can render f
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -277,7 +277,7 @@ exports[`Rendering points - areas Multi series area chart - ordinal can render f
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -306,7 +306,7 @@ exports[`Rendering points - areas Multi series area chart - ordinal can render f
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -334,7 +334,7 @@ exports[`Rendering points - areas Multi series area chart - ordinal can render f
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -368,7 +368,7 @@ exports[`Rendering points - areas Multi series area chart - ordinal can render s
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_2}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -396,7 +396,7 @@ exports[`Rendering points - areas Multi series area chart - ordinal can render s
255,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -425,7 +425,7 @@ exports[`Rendering points - areas Multi series area chart - ordinal can render s
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_2}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -453,7 +453,7 @@ exports[`Rendering points - areas Multi series area chart - ordinal can render s
255,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -487,7 +487,7 @@ exports[`Rendering points - areas Multi series area chart - time can render firs
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -515,7 +515,7 @@ exports[`Rendering points - areas Multi series area chart - time can render firs
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -544,7 +544,7 @@ exports[`Rendering points - areas Multi series area chart - time can render firs
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -572,7 +572,7 @@ exports[`Rendering points - areas Multi series area chart - time can render firs
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -606,7 +606,7 @@ exports[`Rendering points - areas Multi series area chart - time can render seco
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_2}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -634,7 +634,7 @@ exports[`Rendering points - areas Multi series area chart - time can render seco
255,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -663,7 +663,7 @@ exports[`Rendering points - areas Multi series area chart - time can render seco
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_2}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -691,7 +691,7 @@ exports[`Rendering points - areas Multi series area chart - time can render seco
255,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -725,7 +725,7 @@ exports[`Rendering points - areas Single series area chart - linear Can render t
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -753,7 +753,7 @@ exports[`Rendering points - areas Single series area chart - linear Can render t
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -782,7 +782,7 @@ exports[`Rendering points - areas Single series area chart - linear Can render t
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -810,7 +810,7 @@ exports[`Rendering points - areas Single series area chart - linear Can render t
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -844,7 +844,7 @@ exports[`Rendering points - areas Single series area chart - ordinal Can render
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -872,7 +872,7 @@ exports[`Rendering points - areas Single series area chart - ordinal Can render
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -901,7 +901,7 @@ exports[`Rendering points - areas Single series area chart - ordinal Can render
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -929,7 +929,7 @@ exports[`Rendering points - areas Single series area chart - ordinal Can render
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -963,7 +963,7 @@ exports[`Rendering points - areas Single series area chart - time Can render two
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -991,7 +991,7 @@ exports[`Rendering points - areas Single series area chart - time Can render two
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down Expand Up @@ -1020,7 +1020,7 @@ exports[`Rendering points - areas Single series area chart - time Can render two
"top": 0,
"width": 100,
},
"radius": 2,
"radius": 3,
"seriesIdentifier": {
"key": "groupId{group_1}spec{spec_1}yAccessor{1}splitAccessors{}",
"seriesKeys": [
Expand Down Expand Up @@ -1048,7 +1048,7 @@ exports[`Rendering points - areas Single series area chart - time Can render two
0,
1,
],
"width": 1,
"width": 2,
},
},
"transform": {
Expand Down
Loading

0 comments on commit c5882f4

Please sign in to comment.