Merge pull request #409 from edewit/toobar-buttons

added space between buttons
This commit is contained in:
mfrances17 2021-03-02 15:48:38 -05:00 committed by GitHub
commit 65ea88383b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 12 deletions

View file

@ -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);

View file

@ -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;
}

View file

@ -7,6 +7,7 @@ import {
Button,
ButtonVariant,
PageSection,
ToolbarItem,
} from "@patternfly/react-core";
import { ViewHeader } from "../components/view-header/ViewHeader";
@ -92,15 +93,19 @@ export const ClientsSection = () => {
searchPlaceholderKey="clients:searchForClient"
toolbarItem={
<>
<ToolbarItem>
<Button onClick={() => history.push(`${url}/add-client`)}>
{t("createClient")}
</Button>
</ToolbarItem>
<ToolbarItem>
<Button
onClick={() => history.push(`${url}/import-client`)}
variant="link"
>
{t("importClient")}
</Button>
</ToolbarItem>
</>
}
actions={[