Skip to content

Commit

Permalink
Fix codacy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
IkramMaalej committed Feb 20, 2023
1 parent 1f770b4 commit 01f059d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ public static List<WebElement> getRowsOfTable(WebElement table) {
return table.findElements(By.tagName("tr"));
}

/**
* Gets number of selected rows in a given table.
* @param table as a WebElement
* @return number of selected rows
*/
public static long getSelectedRowsOfTable(WebElement table) {
return getRowsOfTable(table)
.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ public int countListedBatches() throws Exception {
return batchSelect.getOptions().size();
}

/**
* Gets number of selected rows in processesTable.
* @return number of selected rows
* @throws Exception exception
*/
public long countListedSelectedProcesses() throws Exception {
if (!isAt()) {
goTo();
Expand Down Expand Up @@ -460,6 +465,9 @@ public void clickProcessesTableHeaderForSorting(int column) {
.until(() -> !columnHeader.getAttribute("aria-sort").equals(previousAriaSort));
}

/**
* Select all rows on a page in processesTable.
*/
public void selectAllRowsOnPage() {
selectAllCheckBox.click();
await(WAIT_FOR_SELECTION_MENU).pollDelay(700, TimeUnit.MILLISECONDS)
Expand All @@ -469,6 +477,9 @@ public void selectAllRowsOnPage() {
.atMost(30, TimeUnit.SECONDS).until(() -> processesTable.isDisplayed());
}

/**
* Select all rows on all pages in processesTable.
*/
public void selectAllRows() {
selectAllCheckBox.click();
await(WAIT_FOR_SELECTION_MENU).pollDelay(700, TimeUnit.MILLISECONDS)
Expand All @@ -478,6 +489,9 @@ public void selectAllRows() {
.atMost(30, TimeUnit.SECONDS).until(() -> processesTable.isDisplayed());
}

/**
* Go to next page in processesTable.
*/
public void goToNextPage() {
if (nextPage.isEnabled()) {
nextPage.click();
Expand Down

0 comments on commit 01f059d

Please sign in to comment.