keycloak-scim/cypress/support/pages/admin_console/manage/groups/SearchGroupPage.ts
2022-06-27 10:47:41 +02:00

27 lines
661 B
TypeScript

import GroupPage from "./GroupPage";
export class SearchGroupPage extends GroupPage {
private searchField = "group-search";
private searchButton = "search-button";
public searchGroup(groupName: string) {
this.typeSearchInput(groupName);
this.clickSearchButton();
return this;
}
public typeSearchInput(value: string) {
cy.findByTestId(this.searchField).type(value);
return this;
}
public clickSearchButton() {
cy.findByTestId(this.searchButton).click();
return this;
}
public checkTerm(searchTerm: string) {
cy.get(".pf-c-chip-group").children().contains(searchTerm).should("exist");
return this;
}
}