silevis / reactgrid

Add spreadsheet-like behavior to your React app
https://reactgrid.com
MIT License
1.14k stars 123 forks source link

React Testing Library user events doesn't work on Table #404

Open Mengeroshi opened 1 month ago

Mengeroshi commented 1 month ago

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.

webloopbox commented 1 month ago

Hi @Mengeroshi, could you please provide a reproduction?