Skip to content

Commit 1b7adad

Browse files
Merge 25.11 to develop
2 parents 091b00c + 68f697b commit 1b7adad

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/org/labkey/test/util/DataRegionTable.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,20 @@ public void assertPaginationText(int firstRow, int lastRow, int totalRows)
278278
assertEquals("Wrong pagination text", expected, fullPaginationText);
279279
}
280280

281+
/**
282+
* Assert that a Data Region has expected selection text (e.g. "Selected 100,000 of 1,234,567")
283+
* @param selectedRows number of selected rows
284+
* @param totalRows total number of rows in data behind the dataregion
285+
*/
286+
public void assertSelectionText(int selectedRows, int totalRows)
287+
{
288+
String expected = "Selected " + String.format("%,d", selectedRows) + " of " + String.format("%,d", totalRows) + " rows.";
289+
String fullSelectionText = Locator.tagWithAttribute("div", "data-msgpart", "selection")
290+
.findElement(this).getText();
291+
292+
assertTrue("Expected text to start with: " + expected + " Full text: " + fullSelectionText, fullSelectionText.startsWith(expected));
293+
}
294+
281295
/**
282296
* @deprecated Renamed. Use {@link #getRowIndex(CharSequence, String)}
283297
*/

0 commit comments

Comments
 (0)