Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 983007df authored by Sonali MOHANTY's avatar Sonali MOHANTY
Browse files

1)All the changes made as per the comment

2)some locator and method got changed as some feature changes for expanding metadata
parent 0942a4e7
No related branches found
No related tags found
No related merge requests found
......@@ -18,13 +18,11 @@ public class ServiceGroupRow extends PageComponent {
}
// private WebElement container;
@FindBy(tagName = "datatable-body-cell")
protected List<WebElement> cells;
/*@FindBy(className = "table-button-expand")
private WebElement expandMetadata;*/
@FindBy(css = ".ng-star-inserted.datatable-icon-right")
private WebElement expandMetadata;
......
......@@ -47,10 +47,10 @@ public class UserPopup extends PageComponent {
@FindBy(css = ".mat-form-field-infix > div.has-error")
WebElement passMatchValidationError;
@FindBy(css = "mat-dialog-content > table > tbody > tr > td > button:nth-child(1)")
@FindBy(css = "mat-dialog-content > table > tr > td > button:nth-child(1)")
WebElement okBtn;
@FindBy(css = "mat-dialog-content > table > tbody > tr > td > button:nth-child(2)")
@FindBy(css = "mat-dialog-content > table > tr > td > button:nth-child(2)")
WebElement cancelBtn;
@FindBy(css = "#role_id")
......
......@@ -29,49 +29,43 @@ public class UsersGrid extends BasicGrid {
}
public boolean isUserListed(String username) {
boolean end = false;
PaginationControls pagination = new PaginationControls(driver);
pagination.skipToFirstPage();
List<UserRowInfo> rows;
int count = 0;
do {
List<UserRowInfo> rows = getRows();
if (count != 0) {
pagination.goToNextPage();
}
rows =getRows();
for (UserRowInfo row : rows) {
if (row.getUsername().equalsIgnoreCase(username)) {
return true;
}
}
try {
pagination.goToNextPage();
} catch (Exception e) {
}
} while (pagination.hasNextPage());
count++;
}
while (pagination.hasNextPage());
return false;
}
public int scrollToUser(String username) {
PaginationControls pagination = new PaginationControls(driver);
pagination.skipToFirstPage();
List<UserRowInfo> rows;
int count = 0;
do {
List<UserRowInfo> rows = getRows();
if(count!=0){
pagination.goToNextPage();
}
rows = getRows();
for (int i = 0; i < rows.size(); i++) {
if (rows.get(i).getUsername().equalsIgnoreCase(username)) {
return i;
}
}
try {
pagination.goToNextPage();
} catch (Exception e) {
}
count++;
} while (pagination.hasNextPage());
return -1;
}
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment