Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Fix default formatter for gauge charts #179473

Merged
merged 14 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ import {
Color,
} from '@elastic/charts';

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});
nickofthyme marked this conversation as resolved.
Show resolved Hide resolved

const numberColumn = (id = 'metric-accessor'): DatatableColumn => ({
id,
name: 'Count of records',
Expand All @@ -51,15 +42,6 @@ const numberColumn = (id = 'metric-accessor'): DatatableColumn => ({
},
});

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

const chartsThemeService = chartPluginMock.createSetupContract().theme;
const paletteThemeService = chartPluginMock.createSetupContract().palettes;
const formatService = fieldFormatsServiceMock.createStartContract();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ import HeatmapComponent from './heatmap_component';
import { LegendSize } from '@kbn/visualizations-plugin/common';
import { FieldFormat } from '@kbn/field-formats-plugin/common';

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

const actWithTimeout = (action: Function, timer: number = 1) =>
act(
() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@ import { ChartTypes } from '../../common/types';
import { LegendSize } from '@kbn/visualizations-plugin/common';
import { cloneDeep } from 'lodash';

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

const actWithTimeout = (action: Function, timer: number = 1) =>
act(
() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ import { createMockBucketColumns, createMockVisData } from '../mocks';
const bucketColumns = createMockBucketColumns();
const visData = createMockVisData();

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});

describe('LegendColorPickerWrapper', () => {
const mockState = new Map();
const uiState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ import { LEGACY_LIGHT_THEME, LEGACY_DARK_THEME } from '@elastic/charts';

jest.mock('../../lib/kibana');

jest.mock('@elastic/charts', () => {
const original = jest.requireActual('@elastic/charts');

return {
...original,
getSpecId: jest.fn(() => {}),
};
});
nickofthyme marked this conversation as resolved.
Show resolved Hide resolved

describe('WrappedByAutoSizer', () => {
it('should render correct default height', () => {
const wrapper = shallow(<WrappedByAutoSizer />);
Expand Down