Posted 16 July 2020, 10:41 am EST
Hi, I have a simple Jest test (with React Testing Library). I get the grid to render, but the data rows never appear. Any idea why?
import '@grapecity/wijmo.styles/wijmo.css';
import React from 'react';
import {
FlexGrid,
FlexGridColumn,
} from '@grapecity/wijmo.react.grid';
import {render, screen} from '@testing-library/react';
const mockRowData = [{"pk":1,"shortName":"Burrito Short","longName":"Burrito Long"},
{"pk":2,"shortName":"Taco Short","longName":"Taco Long"}
];
it('should render data on the screen', () => {
render(
<FlexGrid itemsSource={mockRowData} >
<FlexGridColumn header="Pri Key" binding="pk" width="*" />
<FlexGridColumn header="Short Name" binding="shortName" width="*" />
<FlexGridColumn header="Long Name" binding="longName" width="*" />
</FlexGrid>
);
const node = screen.getByText(/Burrito Short/i);
screen.debug();
});