ag-grid icon indicating copy to clipboard operation
ag-grid copied to clipboard

React testing library test for editing cells returns undefined instead of new value.

Open IngridPr opened this issue 2 years ago • 1 comments

I'm submitting a bug report in tests related to ag-grid and editable cells.

Current behavior I have a very simple repo with a grid. It only has one editable cell. In a test I edit this cell. Give it a new value. After presssing enter the new value is not saved. "undefined" is assigned instead.

image

Expected behavior In a test I edit this cell. Give it a new value. After presssing enter the new value is saved. A span with new value in the grid is visible.

I made a very simple repo were this problem is reproduced: https://github.com/IngridPr/editing-cells-bug-in-tests In general it's React, react testing library, ag-grid-community and jest.

  • AG Grid version: 29.2.0 I believe this can be replicated on any version.

  • Browser: The problem is replicable only in tests. Browser behaviour is correct.

IngridPr avatar Apr 11 '23 09:04 IngridPr

@IngridPr It's not a bug, you were trying to type in a div.. instead of the input image Tests pass image

AdrianRS22 avatar May 26 '23 22:05 AdrianRS22