|
8 | 8 |
|
9 | 9 | import React, { useEffect, useState } from 'react';
|
10 | 10 | import { mount, ReactWrapper } from 'enzyme';
|
11 |
| -import { EuiDataGrid } from './'; |
12 |
| -import type { EuiDataGridProps, RenderCellValue } from './data_grid_types'; |
| 11 | +import { act, fireEvent } from '@testing-library/react'; |
13 | 12 | import { findTestSubject, requiredProps } from '../../test';
|
14 | 13 | import { getAllByTestSubject, render } from '../../test/rtl';
|
15 |
| -import { EuiDataGridColumnResizer } from './body/header/data_grid_column_resizer'; |
| 14 | +import { shouldRenderCustomStyles } from '../../test/internal'; |
16 | 15 | import { keys } from '../../services';
|
17 |
| -import { act, fireEvent } from '@testing-library/react'; |
| 16 | + |
| 17 | +import { EuiDataGridColumnResizer } from './body/header/data_grid_column_resizer'; |
| 18 | +import type { EuiDataGridProps, RenderCellValue } from './data_grid_types'; |
| 19 | +import { EuiDataGrid } from './'; |
18 | 20 |
|
19 | 21 | // Mock the cell popover (TODO: Move failing tests to Cypress and remove need for mock?)
|
20 | 22 | jest.mock('../popover', () => ({
|
@@ -487,6 +489,16 @@ describe('EuiDataGrid', () => {
|
487 | 489 | .spyOn(window, 'requestAnimationFrame')
|
488 | 490 | .mockImplementation((cb: any) => cb());
|
489 | 491 |
|
| 492 | + shouldRenderCustomStyles( |
| 493 | + <EuiDataGrid |
| 494 | + aria-label="" |
| 495 | + columns={[]} |
| 496 | + columnVisibility={{ visibleColumns: [], setVisibleColumns: () => {} }} |
| 497 | + rowCount={0} |
| 498 | + renderCellValue={() => null} |
| 499 | + /> |
| 500 | + ); |
| 501 | + |
490 | 502 | describe('rendering', () => {
|
491 | 503 | const getBoundingClientRect =
|
492 | 504 | window.Element.prototype.getBoundingClientRect;
|
|
0 commit comments