reactgrid icon indicating copy to clipboard operation
reactgrid copied to clipboard

React Testing Library user events doesn't work on Table

Open Mengeroshi opened this issue 9 months ago • 1 comments

I'm trying to do a simple test filling a text cell with React Testing Library but actions doesn't seem to affect the table.

const textCell = screen.getByText('Text Cell Placeholder');

await user.dblClick(textCell);

const rgCellEditor = await screen.findAllByRole('textbox')[0];
//at this point, the input that edit the texcells on table should be appear but it doesn't

 await user.type(rgCellEditor, '123');
 await user.keyboard('{Enter}');

disableVirtualScrolling = true

This should be enough to fill the text cell but it doesn't work.

Also, I did an E2E test with Playwright with the same instructions and it works.

Mengeroshi avatar May 23 '24 09:05 Mengeroshi