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
|
||||
|
||||
cy.get('[data-cy=add-role-button]').click();
|
||||
cy.get("[data-cy=add-role-button]").click();
|
||||
|
||||
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);
|
||||
|
||||
|
@ -104,6 +104,11 @@ describe("Realm roles test", function () {
|
|||
cy.get("#add-associated-roles-button").contains("Add").click();
|
||||
|
||||
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 = {
|
||||
id?: string,
|
||||
message: string;
|
||||
instructions: string;
|
||||
primaryActionText?: string;
|
||||
|
@ -28,6 +29,7 @@ export type ListEmptyStateProps = {
|
|||
};
|
||||
|
||||
export const ListEmptyState = ({
|
||||
id,
|
||||
message,
|
||||
instructions,
|
||||
onPrimaryAction,
|
||||
|
@ -38,7 +40,7 @@ export const ListEmptyState = ({
|
|||
}: ListEmptyStateProps) => {
|
||||
return (
|
||||
<>
|
||||
<EmptyState variant="large">
|
||||
<EmptyState id={id} variant="large">
|
||||
{hasIcon && isSearchVariant ? (
|
||||
<EmptyStateIcon icon={SearchIcon} />
|
||||
) : (
|
||||
|
|
|
@ -343,7 +343,7 @@ export const RealmRoleTabs = () => {
|
|||
eventKey="users-in-role"
|
||||
title={<TabTitleText>{t("usersInRole")}</TabTitleText>}
|
||||
>
|
||||
<UsersInRoleTab />
|
||||
<UsersInRoleTab data-cy="users-in-role-tab" />
|
||||
</Tab>
|
||||
</KeycloakTabs>
|
||||
)}
|
||||
|
|
|
@ -38,7 +38,7 @@ export const UsersInRoleTab = () => {
|
|||
hasIcon={true}
|
||||
message={t("noDirectUsers")}
|
||||
instructions={t("noUsersEmptyStateDescription")}
|
||||
primaryActionText={t("addUser")}
|
||||
id="users-empty-state"
|
||||
/>
|
||||
) : (
|
||||
<KeycloakDataTable
|
||||
|
|
Loading…
Reference in a new issue