cypress test
This commit is contained in:
parent
8ead0d0fff
commit
7657c4df73
4 changed files with 13 additions and 6 deletions
|
@ -89,13 +89,13 @@ describe("Realm roles test", function () {
|
||||||
|
|
||||||
// Add associated client role
|
// Add associated client role
|
||||||
|
|
||||||
cy.get('[data-cy=add-role-button]').click();
|
cy.get("[data-cy=add-role-button]").click();
|
||||||
|
|
||||||
cy.wait(100);
|
cy.wait(100);
|
||||||
|
|
||||||
cy.get('[data-cy=filter-type-dropdown]').click()
|
cy.get("[data-cy=filter-type-dropdown]").click();
|
||||||
|
|
||||||
cy.get('[data-cy=filter-type-dropdown-item]').click()
|
cy.get("[data-cy=filter-type-dropdown-item]").click();
|
||||||
|
|
||||||
cy.wait(2500);
|
cy.wait(2500);
|
||||||
|
|
||||||
|
@ -104,6 +104,11 @@ describe("Realm roles test", function () {
|
||||||
cy.get("#add-associated-roles-button").contains("Add").click();
|
cy.get("#add-associated-roles-button").contains("Add").click();
|
||||||
|
|
||||||
cy.wait(2500);
|
cy.wait(2500);
|
||||||
|
|
||||||
|
cy.contains("Users in role")
|
||||||
|
.click()
|
||||||
|
.get("#users-empty-state > div > h4")
|
||||||
|
.contains("No direct users");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,6 +18,7 @@ export type Action = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ListEmptyStateProps = {
|
export type ListEmptyStateProps = {
|
||||||
|
id?: string,
|
||||||
message: string;
|
message: string;
|
||||||
instructions: string;
|
instructions: string;
|
||||||
primaryActionText?: string;
|
primaryActionText?: string;
|
||||||
|
@ -28,6 +29,7 @@ export type ListEmptyStateProps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ListEmptyState = ({
|
export const ListEmptyState = ({
|
||||||
|
id,
|
||||||
message,
|
message,
|
||||||
instructions,
|
instructions,
|
||||||
onPrimaryAction,
|
onPrimaryAction,
|
||||||
|
@ -38,7 +40,7 @@ export const ListEmptyState = ({
|
||||||
}: ListEmptyStateProps) => {
|
}: ListEmptyStateProps) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<EmptyState variant="large">
|
<EmptyState id={id} variant="large">
|
||||||
{hasIcon && isSearchVariant ? (
|
{hasIcon && isSearchVariant ? (
|
||||||
<EmptyStateIcon icon={SearchIcon} />
|
<EmptyStateIcon icon={SearchIcon} />
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -343,7 +343,7 @@ export const RealmRoleTabs = () => {
|
||||||
eventKey="users-in-role"
|
eventKey="users-in-role"
|
||||||
title={<TabTitleText>{t("usersInRole")}</TabTitleText>}
|
title={<TabTitleText>{t("usersInRole")}</TabTitleText>}
|
||||||
>
|
>
|
||||||
<UsersInRoleTab />
|
<UsersInRoleTab data-cy="users-in-role-tab" />
|
||||||
</Tab>
|
</Tab>
|
||||||
</KeycloakTabs>
|
</KeycloakTabs>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -38,7 +38,7 @@ export const UsersInRoleTab = () => {
|
||||||
hasIcon={true}
|
hasIcon={true}
|
||||||
message={t("noDirectUsers")}
|
message={t("noDirectUsers")}
|
||||||
instructions={t("noUsersEmptyStateDescription")}
|
instructions={t("noUsersEmptyStateDescription")}
|
||||||
primaryActionText={t("addUser")}
|
id="users-empty-state"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<KeycloakDataTable
|
<KeycloakDataTable
|
||||||
|
|
Loading…
Reference in a new issue