In my e2e, I need to check if the datatable is populated first before before checkboxes in the table are clicked.
I am able to check the count like so
cy.get('.p-datatable-table').find('tr').its('length').should('be.gte', 0);
unfortunately, the below does not work.
if (cy.get('.p-datatable-table').find('tr').its('length').should('be.gte', 0)) {
cy.get('.select-all-boxes').click();
}
Any suggestions?