在AgGrid测试中触发onRowClick事件

时间:2020-05-29 09:16:09

标签: ag-grid react-testing-library ag-grid-react

我正在尝试使用AgGrid触发行单击事件。我这样写:

  it('shows the modal when click the row -2', async () => {
    render(<GroupsContainer data={data} filteredList={[rowData]} />);

    const row = screen.getByRole('gridcell', { name: /group1/i });
    userEvent.click(row);// Seems like this doesn't work
    const modal = await screen.findByRole('dialog');
  });

0 个答案:

没有答案