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"); masthead.checkNotificationMessage("Group created");
sidebarPage.goToGroups(); sidebarPage.goToGroups();
listingPage.searchItem(groupName).itemExist(groupName); listingPage.searchItem(groupName, false).itemExist(groupName);
// Delete // Delete
listingPage.deleteItem(groupName); listingPage.deleteItem(groupName);

View file

@ -34,10 +34,16 @@ export default class ListingPage {
return this; 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.searchInput).type(searchValue);
cy.get(this.searchBtn).click(); cy.get(this.searchBtn).click();
if (wait) {
cy.wait(["@searchClients"]);
}
return this; return this;
} }

View file

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