added wait for backend request
This commit is contained in:
parent
5d5160bddc
commit
fbc81395d1
2 changed files with 9 additions and 3 deletions
|
@ -34,7 +34,7 @@ describe("Group test", () => {
|
|||
masthead.checkNotificationMessage("Group created");
|
||||
|
||||
sidebarPage.goToGroups();
|
||||
listingPage.searchItem(groupName).itemExist(groupName);
|
||||
listingPage.searchItem(groupName, false).itemExist(groupName);
|
||||
|
||||
// Delete
|
||||
listingPage.deleteItem(groupName);
|
||||
|
|
|
@ -34,10 +34,16 @@ export default class ListingPage {
|
|||
return this;
|
||||
}
|
||||
|
||||
searchItem(searchValue: string) {
|
||||
searchItem(searchValue: string, wait = true) {
|
||||
if (wait) {
|
||||
const searchUrl = `/admin/realms/master/*${searchValue}*`;
|
||||
cy.intercept(searchUrl).as("searchClients");
|
||||
}
|
||||
cy.get(this.searchInput).type(searchValue);
|
||||
cy.get(this.searchBtn).click();
|
||||
|
||||
if (wait) {
|
||||
cy.wait(["@searchClients"]);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue