Skip to content

Commit d2e8853

Browse files
committed
[tests] Confirm EuiDataGrid correctly merges consumer css
1 parent a1a876e commit d2e8853

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

packages/eui/src/components/datagrid/data_grid.test.tsx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88

99
import React, { useEffect, useState } from 'react';
1010
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';
1312
import { findTestSubject, requiredProps } from '../../test';
1413
import { getAllByTestSubject, render } from '../../test/rtl';
15-
import { EuiDataGridColumnResizer } from './body/header/data_grid_column_resizer';
14+
import { shouldRenderCustomStyles } from '../../test/internal';
1615
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 './';
1820

1921
// Mock the cell popover (TODO: Move failing tests to Cypress and remove need for mock?)
2022
jest.mock('../popover', () => ({
@@ -487,6 +489,16 @@ describe('EuiDataGrid', () => {
487489
.spyOn(window, 'requestAnimationFrame')
488490
.mockImplementation((cb: any) => cb());
489491

492+
shouldRenderCustomStyles(
493+
<EuiDataGrid
494+
aria-label=""
495+
columns={[]}
496+
columnVisibility={{ visibleColumns: [], setVisibleColumns: () => {} }}
497+
rowCount={0}
498+
renderCellValue={() => null}
499+
/>
500+
);
501+
490502
describe('rendering', () => {
491503
const getBoundingClientRect =
492504
window.Element.prototype.getBoundingClientRect;

0 commit comments

Comments
 (0)