4

How can I simulate a click on a button rendered on the last column of the first row in Ag-Grid? I am able to get the first row using getDisplayedRowAtIndex(0). But have no clue how to proceed further

Any pointers?

** Trying to simulate a click using enzyme wrapper for testing purposes.

aakashgupta.0205
  • 647
  • 1
  • 8
  • 23

1 Answers1

0

I just add a unique id to my button then find it and simulate a click.

const component = mount(<bla..>);
component.find('button#id').simulate('click', {});
Taran
  • 12,822
  • 3
  • 43
  • 47