kpmck / cypress-ag-grid

Cypress plugin for interacting with ag grid
30 stars 17 forks source link

Validating paginated table tests are flaky #34

Closed brianbarenbaum closed 1 year ago

brianbarenbaum commented 1 year ago

Hi @kpmck. Great library! My main issue is that my .agGridValidatePaginatedTable tests are flaky. When the tests paginate through the grid, they intermittently try to get the grid data before the cells have rendered.

The issue is similar to #25, but in this case the getAgGridData() function is running inside your validateTablePages function. So, cy.get(“.ag-grid-cell”).should(“be.visible”) would need to be added inside that function so that it waits for the cells to be rendered on each page.

I did the above modification to the function locally and it does solve the issue. Would it be possible to bake this change into the library?

I would assume that if someone is validating a table with multiple pages, they wouldn't expect an empty grid, so I doubt that would be a typical problem.

Thanks!

kpmck commented 1 year ago

Hey @brianbarenbaum - this is an easy enough fix that shouldn't negatively impact anyone else. I'll put a fix in as soon as I can. Thanks for bringing this up!

kpmck commented 1 year ago

This is resolved in https://github.com/kpmck/cypress-ag-grid/pull/36

brianbarenbaum commented 1 year ago

This is resolved in #36

Works great, thanks!