mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Discover][UnifiedDataTable] Fix flaky jest test
Preventing a flaky jest test by adding waitFor functionality
This commit is contained in:
parent
d0d33aab38
commit
d3727a5342
1 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@ import {
|
|||
stubLogstashDataView,
|
||||
} from '@kbn/data-views-plugin/common/data_view.stub';
|
||||
import { DataTableColumnHeader } from './data_table_column_header';
|
||||
import { waitFor } from '@testing-library/react';
|
||||
|
||||
const stubDataViewWithNested = createStubDataView({
|
||||
spec: {
|
||||
|
@ -71,7 +72,7 @@ describe('DataTableColumnHeader', function () {
|
|||
/>
|
||||
);
|
||||
expect(component.find(FieldIcon).first().prop('type')).toBe('number');
|
||||
expect(component.text()).toBe('NumberbytesDisplayName');
|
||||
await waitFor(() => expect(component.text()).toBe('NumberbytesDisplayName'));
|
||||
});
|
||||
|
||||
it('should render a correct token for a custom column type (in case of text-based queries)', async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue