From 310eeb96c07c3c3332e6d1a0a35865a71ff48a5c Mon Sep 17 00:00:00 2001 From: Marco Vettorello Date: Wed, 5 Apr 2023 16:10:13 +0200 Subject: [PATCH] test: update tests to reflect change in tick count --- .../chart_state.debug.test.ts.snap | 40 ------------------- .../xy_chart/utils/axis_utils.test.ts | 2 +- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/packages/charts/src/chart_types/xy_chart/state/__snapshots__/chart_state.debug.test.ts.snap b/packages/charts/src/chart_types/xy_chart/state/__snapshots__/chart_state.debug.test.ts.snap index 6ae19e0a8f..a5c6513c70 100644 --- a/packages/charts/src/chart_types/xy_chart/state/__snapshots__/chart_state.debug.test.ts.snap +++ b/packages/charts/src/chart_types/xy_chart/state/__snapshots__/chart_state.debug.test.ts.snap @@ -45,30 +45,20 @@ exports[`XYChart - debug state line chart rotation: -90 1`] = ` "id": "yAxis", "labels": [ "0", - "1", "2", - "3", "4", - "5", "6", - "7", "8", - "9", "10", ], "position": "bottom", "title": undefined, "values": [ 0, - 1, 2, - 3, 4, - 5, 6, - 7, 8, - 9, 10, ], }, @@ -159,30 +149,20 @@ exports[`XYChart - debug state line chart rotation: 0 1`] = ` "id": "yAxis", "labels": [ "0", - "1", "2", - "3", "4", - "5", "6", - "7", "8", - "9", "10", ], "position": "left", "title": undefined, "values": [ 0, - 1, 2, - 3, 4, - 5, 6, - 7, 8, - 9, 10, ], }, @@ -273,30 +253,20 @@ exports[`XYChart - debug state line chart rotation: 90 1`] = ` "id": "yAxis", "labels": [ "0", - "1", "2", - "3", "4", - "5", "6", - "7", "8", - "9", "10", ], "position": "bottom", "title": undefined, "values": [ 0, - 1, 2, - 3, 4, - 5, 6, - 7, 8, - 9, 10, ], }, @@ -387,30 +357,20 @@ exports[`XYChart - debug state line chart rotation: 180 1`] = ` "id": "yAxis", "labels": [ "0", - "1", "2", - "3", "4", - "5", "6", - "7", "8", - "9", "10", ], "position": "left", "title": undefined, "values": [ 0, - 1, 2, - 3, 4, - 5, 6, - 7, 8, - 9, 10, ], }, diff --git a/packages/charts/src/chart_types/xy_chart/utils/axis_utils.test.ts b/packages/charts/src/chart_types/xy_chart/utils/axis_utils.test.ts index 586883b959..22fa3697ed 100644 --- a/packages/charts/src/chart_types/xy_chart/utils/axis_utils.test.ts +++ b/packages/charts/src/chart_types/xy_chart/utils/axis_utils.test.ts @@ -208,7 +208,7 @@ describe('Axis computational utils', () => { expect(yScale?.bandwidth).toBe(0); expect(yScale?.domain).toEqual([0, 1]); expect(yScale?.range).toEqual([100, 0]); - expect(yScale?.ticks()).toEqual([0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]); + expect(yScale?.ticks()).toEqual([0, 0.2, 0.4, 0.6, 0.8, 1]); const ungroupedAxisSpec = { ...verticalAxisSpec, groupId: 'foo' }; const nullYScale = getScaleForAxisSpec(