@Test
    @Order(5)
    @DisplayName("DataTable: remove row without filter or sort applied (DataTable#filterAndSort)")
    void removeRowWithoutFilterOrSortAppliedV2(Page page) {
        // Arrange
        DataTable dataTable = page.dataTable;
        int rows = dataTable.getRows().size();

        // Act
        WebElement removeButton = dataTable.getRow(0).getCell(4).getWebElement().findElement(By.className("ui-button"));
        PrimeSelenium.guardAjax(removeButton).click();

        // Assert - one row less than before
        assertEquals(rows - 1, dataTable.getRows().size());

        assertNoJavascriptErrors();
    }
Add and remove rows from filtered DataTable
https://github.com/primefaces/primefaces/issues/7336
primefaces-integration-tests/src/test/java/org/primefaces/integrationtests/datatable/DataTable021Test.java