MCPcopy
hub / github.com/Comcast/react-data-grid / setup

Function setup

test/browser/utils.tsx:7–32  ·  view source on GitHub ↗
(
  props: DataGridProps<R, SR, K>,
  renderBeforeAfterButtons = false
)

Source from the content-addressed store, hash-verified

5import type { DataGridProps } from '../../src';
6
7export function setup<R, SR, K extends React.Key = React.Key>(
8 props: DataGridProps<R, SR, K>,
9 renderBeforeAfterButtons = false
10) {
11 const grid = (
12 <DataGrid
13 {...props}
14 className={css`
15 block-size: 1080px;
16 scrollbar-width: none;
17 `}
18 />
19 );
20
21 if (renderBeforeAfterButtons) {
22 return page.render(
23 <>
24 <button type="button">Before</button>
25 {grid}
26 <br />
27 <button type="button">After</button>
28 </>
29 );
30 }
31 return page.render(grid);
32}
33
34export function getGrid() {
35 return page.getByRole('grid');

Callers 15

rowClass.test.tsFile · 0.90
direction.test.tsFile · 0.90
setupGridFunction · 0.90
setupGridFunction · 0.90
label.test.tsFile · 0.90
renderers.test.tsxFile · 0.90
grouping.test.tsFile · 0.90
key.test.tsFile · 0.90

Calls

no outgoing calls

Tested by 3

setupGridFunction · 0.72
setupGridFunction · 0.72
setupColSpanFunction · 0.72