mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Lens] remove warnings when running the tests (#131373)
This commit is contained in:
parent
d4494ad4c1
commit
0558903e43
1 changed files with 6 additions and 5 deletions
|
@ -12,7 +12,8 @@ import { chartPluginMock } from '@kbn/charts-plugin/public/mocks';
|
|||
import { dataPluginMock } from '@kbn/data-plugin/public/mocks';
|
||||
import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks';
|
||||
import type { Datatable } from '@kbn/expressions-plugin/public';
|
||||
import { shallow, mount } from 'enzyme';
|
||||
import { shallow } from 'enzyme';
|
||||
import { mountWithIntl } from '@kbn/test-jest-helpers';
|
||||
import { findTestSubject } from '@elastic/eui/lib/test';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import PartitionVisComponent, { PartitionVisComponentProps } from './partition_vis_component';
|
||||
|
@ -143,7 +144,7 @@ describe('PartitionVisComponent', function () {
|
|||
});
|
||||
|
||||
it('renders the legend toggle component', async () => {
|
||||
const component = mount(<PartitionVisComponent {...wrapperProps} />);
|
||||
const component = mountWithIntl(<PartitionVisComponent {...wrapperProps} />);
|
||||
await actWithTimeout(async () => {
|
||||
await component.update();
|
||||
});
|
||||
|
@ -154,7 +155,7 @@ describe('PartitionVisComponent', function () {
|
|||
});
|
||||
|
||||
it('hides the legend if the legend toggle is clicked', async () => {
|
||||
const component = mount(<PartitionVisComponent {...wrapperProps} />);
|
||||
const component = mountWithIntl(<PartitionVisComponent {...wrapperProps} />);
|
||||
await actWithTimeout(async () => {
|
||||
await component.update();
|
||||
});
|
||||
|
@ -233,7 +234,7 @@ describe('PartitionVisComponent', function () {
|
|||
],
|
||||
} as unknown as Datatable;
|
||||
const newProps = { ...wrapperProps, visData: newVisData };
|
||||
const component = mount(<PartitionVisComponent {...newProps} />);
|
||||
const component = mountWithIntl(<PartitionVisComponent {...newProps} />);
|
||||
expect(findTestSubject(component, 'partitionVisEmptyValues').text()).toEqual(
|
||||
'No results found'
|
||||
);
|
||||
|
@ -264,7 +265,7 @@ describe('PartitionVisComponent', function () {
|
|||
],
|
||||
} as unknown as Datatable;
|
||||
const newProps = { ...wrapperProps, visData: newVisData };
|
||||
const component = mount(<PartitionVisComponent {...newProps} />);
|
||||
const component = mountWithIntl(<PartitionVisComponent {...newProps} />);
|
||||
expect(findTestSubject(component, 'partitionVisNegativeValues').text()).toEqual(
|
||||
"Pie chart can't render with negative values."
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue