Add more a11y tests (#19379)

This commit is contained in:
agagancarczyk 2023-03-30 09:44:36 +01:00 committed by GitHub
parent 48082d08ec
commit 2ed1a9b72d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 452 additions and 68 deletions

View file

@ -69,17 +69,4 @@ describe("Policies", () => {
);
});
});
describe("Accessibility tests for authentication policies", () => {
beforeEach(() => {
loginPage.logIn();
keycloakBefore();
sidebarPage.goToAuthentication();
cy.injectAxe();
});
it("Check a11y violations on load/ authentication policies", () => {
cy.checkA11y();
});
});
});

View file

@ -81,19 +81,4 @@ describe("Authentication - Policies - CIBA", () => {
CIBAPolicyPage.getExpiresInput().should("have.value", "140");
CIBAPolicyPage.getIntervalInput().should("have.value", "20");
});
describe("Accessibility tests for authentication policies ciba", () => {
beforeEach(() => {
loginPage.logIn();
keycloakBefore();
sidebarPage.goToRealm(realmName);
sidebarPage.goToAuthentication();
CIBAPolicyPage.goToTab();
cy.injectAxe();
});
it("Check a11y violations on load for authentication policies ciba", () => {
cy.checkA11y();
});
});
});

View file

@ -11,6 +11,9 @@ import PasswordPolicies from "../support/pages/admin-ui/manage/authentication/Pa
import ModalUtils from "../support/util/ModalUtils";
import CommonPage from "../support/pages/CommonPage";
import BindFlowModal from "../support/pages/admin-ui/manage/authentication/BindFlowModal";
import OTPPolicies from "../support/pages/admin-ui/manage/authentication/OTPPolicies";
import WebAuthnPolicies from "../support/pages/admin-ui/manage/authentication/WebAuthnPolicies";
import CIBAPolicyPage from "../support/pages/admin-ui/manage/authentication/CIBAPolicyPage";
const loginPage = new LoginPage();
const masthead = new Masthead();
@ -256,6 +259,12 @@ describe("Password policies tab", () => {
describe("Accessibility tests for authentication", () => {
const realmName = "a11y-realm";
const flowName = "SubFlow";
const requiredActionsPage = new RequiredActions();
const passwordPoliciesPage = new PasswordPolicies();
const otpPoliciesPage = new OTPPolicies();
const webAuthnPolicies = new WebAuthnPolicies();
const detailPage = new FlowDetails();
before(() => adminClient.createRealm(realmName));
after(() => adminClient.deleteRealm(realmName));
@ -268,7 +277,63 @@ describe("Accessibility tests for authentication", () => {
cy.injectAxe();
});
it("Check a11y violations on load/ authentication", () => {
it("Check a11y violations on load/ authentication tab/ flows sub tab", () => {
cy.checkA11y();
});
it("Check a11y violations on load/ authentication tab/ flows sub tab/ creating flow form", () => {
listingPage.goToCreateItem();
cy.checkA11y();
cy.findByTestId("cancel").click();
});
it("Check a11y violations on load/ authentication tab/ flows sub tab/ creating flow", () => {
listingPage.goToCreateItem();
detailPage.fillCreateForm(
flowName,
"Some nice description about what this flow does",
"Client flow"
);
cy.checkA11y();
});
it("Check a11y violations on load/ authentication tab/ flows sub tab/ creating flow form", () => {
listingPage.goToItemDetails("reset credentials");
cy.checkA11y();
});
it("Check a11y violations on load/ authentication tab/ required actions sub tab", () => {
requiredActionsPage.goToTab();
cy.checkA11y();
});
it("Check a11y violations on load/ policies tab/ password policy sub tab", () => {
passwordPoliciesPage.goToTab();
cy.checkA11y();
});
it("Check a11y violations on load/ authentication tab/ policies sub tab/ adding policy", () => {
passwordPoliciesPage.goToTab().addPolicy("Not Recently Used");
cy.checkA11y();
});
it("Check a11y violations on load/ policies tab/ otp policy sub tab", () => {
otpPoliciesPage.goToTab();
cy.checkA11y();
});
it("Check a11y violations on load/ policies tab/ WebAuthn Policies sub tab", () => {
webAuthnPolicies.goToTab();
cy.checkA11y();
});
it("Check a11y violations on load/ policies tab/ WebAuthn Passwordless Policies sub tab", () => {
webAuthnPolicies.goToPasswordlessTab();
cy.checkA11y();
});
it("Check a11y violations on load/ policies tab/ CIBA Policy sub tab", () => {
CIBAPolicyPage.goToTab();
cy.checkA11y();
});
});

View file

@ -192,25 +192,4 @@ describe("Clients SAML tests", () => {
settingsTab.assertLoginSettings();
});
});
describe("Accessibility tests for clients saml", () => {
beforeEach(() => {
loginPage.logIn();
keycloakBefore();
sidebarPage.goToClients();
cy.injectAxe();
});
it("Check a11y violations on load/ clients saml", () => {
const samlClient = "saml";
adminClient.createClient({
clientId: "saml",
protocol: samlClient,
});
listingPage.searchItem(samlClient).goToItemDetails(samlClient);
cy.checkA11y();
adminClient.deleteClient(samlClient);
});
});
});

View file

@ -6,12 +6,14 @@ import ModalUtils from "../support/util/ModalUtils";
import { keycloakBefore } from "../support/util/keycloak_hooks";
import ListingPage from "../support/pages/admin-ui/ListingPage";
import adminClient from "../support/util/AdminClient";
import KeysTab from "../support/pages/admin-ui/manage/realm_settings/KeysTab";
const loginPage = new LoginPage();
const sidebarPage = new SidebarPage();
const masthead = new Masthead();
const modalUtils = new ModalUtils();
const realmSettingsPage = new RealmSettingsPage();
const keysTab = new KeysTab();
describe("Realm settings events tab tests", () => {
const realmName = "Realm_" + crypto.randomUUID();
@ -35,7 +37,7 @@ describe("Realm settings events tab tests", () => {
const keysUrl = `/admin/realms/${realmName}/keys`;
cy.intercept(keysUrl).as("keysFetch");
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
cy.findByTestId("rs-providers-tab").click();
cy.findAllByTestId("provider-name-link")
.contains("test_aes-generated")
@ -43,7 +45,7 @@ describe("Realm settings events tab tests", () => {
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
cy.findByTestId("rs-providers-tab").click();
cy.findAllByTestId("provider-name-link")
.contains("test_hmac-generated")
@ -51,13 +53,13 @@ describe("Realm settings events tab tests", () => {
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
cy.findByTestId("rs-providers-tab").click();
cy.findAllByTestId("provider-name-link").contains("test_rsa").click();
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
cy.findByTestId("rs-providers-tab").click();
cy.findAllByTestId("provider-name-link")
.contains("test_rsa-generated")
@ -65,7 +67,7 @@ describe("Realm settings events tab tests", () => {
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
cy.findByTestId("rs-providers-tab").click();
cy.findAllByTestId("provider-name-link")
.contains("test_rsa-enc-generated")
@ -79,7 +81,7 @@ describe("Realm settings events tab tests", () => {
const goToKeys = () => {
const keysUrl = `/admin/realms/${realmName}/keys`;
cy.intercept(keysUrl).as("keysFetch");
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
cy.findByTestId("rs-keys-list-tab").click();
cy.wait(["@keysFetch"]);
@ -129,13 +131,13 @@ describe("Realm settings events tab tests", () => {
it("Go to keys tab", () => {
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
});
it("add Providers", () => {
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
cy.findByTestId("rs-providers-tab").click();
@ -181,7 +183,7 @@ describe("Realm settings events tab tests", () => {
it("search providers", () => {
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
cy.findByTestId("rs-providers-tab").click();
@ -233,7 +235,7 @@ describe("Realm settings events tab tests", () => {
it("delete provider", () => {
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
cy.findByTestId("rs-providers-tab").click();
@ -242,7 +244,7 @@ describe("Realm settings events tab tests", () => {
it("list keys", () => {
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-keys-tab").click();
keysTab.goToKeysTab();
realmSettingsPage.checkKeyPublic();
});

View file

@ -4,11 +4,17 @@ import RealmSettingsPage from "../support/pages/admin-ui/manage/realm_settings/R
import Masthead from "../support/pages/admin-ui/Masthead";
import { keycloakBefore } from "../support/util/keycloak_hooks";
import adminClient from "../support/util/AdminClient";
import KeysTab from "../support/pages/admin-ui/manage/realm_settings/KeysTab";
import ModalUtils from "../support/util/ModalUtils";
import UserRegistration from "../support/pages/admin-ui/manage/realm_settings/UserRegistration";
const loginPage = new LoginPage();
const sidebarPage = new SidebarPage();
const masthead = new Masthead();
const realmSettingsPage = new RealmSettingsPage();
const userRegistration = new UserRegistration();
const keysTab = new KeysTab();
const modalUtils = new ModalUtils();
describe("Realm settings tabs tests", () => {
const realmName = "Realm_" + crypto.randomUUID();
@ -46,7 +52,7 @@ describe("Realm settings tabs tests", () => {
function reloadRealm() {
sidebarPage.goToClientScopes();
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-login-tab").click();
realmSettingsPage.goToLoginTab();
}
function testToggle(realmSwitch: string, expectedValue: string) {
@ -57,7 +63,7 @@ describe("Realm settings tabs tests", () => {
it("Go to login tab", () => {
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-login-tab").click();
realmSettingsPage.goToLoginTab();
testToggle(realmSettingsPage.userRegSwitch, "on");
testToggle(realmSettingsPage.forgotPwdSwitch, "on");
@ -88,7 +94,7 @@ describe("Realm settings tabs tests", () => {
});
sidebarPage.goToRealmSettings();
cy.findByTestId("rs-email-tab").click();
realmSettingsPage.goToEmailTab();
//required fields not filled in or not filled properly
realmSettingsPage.addSenderEmail("not a valid email");
realmSettingsPage.fillFromDisplayName("displayName");
@ -124,4 +130,127 @@ describe("Realm settings tabs tests", () => {
realmSettingsPage.saveThemes();
});
describe("Accessibility tests for realm settings", () => {
beforeEach(() => {
loginPage.logIn();
keycloakBefore();
sidebarPage.goToRealmSettings();
cy.injectAxe();
});
it("Check a11y violations on load/ realm settings/ general tab", () => {
cy.checkA11y();
});
it("Check a11y violations on login tab", () => {
realmSettingsPage.goToLoginTab();
cy.checkA11y();
});
it("Check a11y violations on email tab", () => {
realmSettingsPage.goToEmailTab();
cy.checkA11y();
});
it("Check a11y violations on themes tab", () => {
realmSettingsPage.goToThemesTab();
cy.checkA11y();
});
it("Check a11y violations on keys tab/ keys list sub tab", () => {
keysTab.goToKeysTab();
cy.checkA11y();
});
it("Check a11y violations on keys tab/ providers sub tab", () => {
keysTab.goToProvidersTab();
cy.checkA11y();
});
it("Check a11y violations on keys tab/ providers sub tab / adding provider", () => {
keysTab.goToProvidersTab();
cy.findByTestId("addProviderDropdown").click();
cy.checkA11y();
modalUtils.closeModal();
});
it("Check a11y violations on events tab/ event listeners sub tab", () => {
realmSettingsPage.goToEventsTab();
cy.checkA11y();
});
it("Check a11y violations on events tab/ user events settings sub tab", () => {
realmSettingsPage.goToEventsTab().goToUserEventsSettingsSubTab();
cy.checkA11y();
});
it("Check a11y violations on events tab/ admin events settings sub tab", () => {
realmSettingsPage.goToEventsTab().goToAdminEventsSettingsSubTab();
cy.checkA11y();
});
it("Check a11y violations on localization tab", () => {
realmSettingsPage.goToLocalizationTab();
cy.checkA11y();
});
it("Check a11y violations on localization tab/ adding message bundle", () => {
realmSettingsPage.goToLocalizationTab();
cy.findByTestId("add-bundle-button").click();
cy.checkA11y();
modalUtils.cancelModal();
});
it("Check a11y violations on security defenses tab", () => {
realmSettingsPage.goToSecurityDefensesTab();
cy.checkA11y();
});
it("Check a11y violations on sessions tab", () => {
realmSettingsPage.goToSessionsTab();
cy.checkA11y();
});
it("Check a11y violations on tokens tab", () => {
realmSettingsPage.goToTokensTab();
cy.checkA11y();
});
it("Check a11y violations on client policies tab/ profiles sub tab", () => {
realmSettingsPage.goToClientPoliciesTab().goToClientProfilesList();
cy.checkA11y();
});
it("Check a11y violations on client policies tab/ creating profile", () => {
realmSettingsPage.goToClientPoliciesTab().goToClientProfilesList();
cy.findByTestId("createProfile").click();
cy.checkA11y();
cy.findByTestId("cancelCreateProfile").click();
});
it("Check a11y violations on client policies tab/ policies sub tab", () => {
realmSettingsPage.goToClientPoliciesTab().goToClientPoliciesList();
cy.checkA11y();
});
it("Check a11y violations on client policies tab/ creating policy", () => {
realmSettingsPage.goToClientPoliciesTab().goToClientPoliciesList();
cy.findByTestId("no-client-policies-empty-action").click();
cy.checkA11y();
cy.findByTestId("cancelCreatePolicy").click();
});
it("Check a11y violations on user registration tab/ default roles sub tab", () => {
userRegistration.goToTab();
cy.checkA11y();
});
it("Check a11y violations on user registration tab/ default roles sub tab/ assigning role", () => {
userRegistration.goToTab();
cy.findByTestId("assignRole").click();
cy.checkA11y();
modalUtils.cancelModal();
});
});
});

View file

@ -77,4 +77,31 @@ describe("Sessions test", () => {
);
});
});
describe("Accessibility tests for sessions", () => {
beforeEach(() => {
loginPage.logIn();
keycloakBefore();
sidebarPage.goToSessions();
cy.injectAxe();
});
it("Check a11y violations on load/ sessions", () => {
cy.checkA11y();
});
it("Check a11y violations on revocation dialog", () => {
cy.findByTestId("action-dropdown").click();
cy.findByTestId("revocation").click();
cy.checkA11y();
cy.findByTestId("cancel").click();
});
it("Check a11y violations on sign out all active sessions dialog", () => {
cy.findByTestId("action-dropdown").click();
cy.findByTestId("logout-all").click();
cy.checkA11y();
cy.findByTestId("cancel").click();
});
});
});

View file

@ -0,0 +1,19 @@
import LoginPage from "../support/pages/LoginPage";
import SidebarPage from "../support/pages/admin-ui/SidebarPage";
import { keycloakBefore } from "../support/util/keycloak_hooks";
const loginPage = new LoginPage();
const sidebarPage = new SidebarPage();
describe("Accessibility tests for user federation", () => {
beforeEach(() => {
loginPage.logIn();
keycloakBefore();
sidebarPage.goToUserFederation();
cy.injectAxe();
});
it("Check a11y violations on load/ user federation", () => {
cy.checkA11y();
});
});

View file

@ -12,6 +12,8 @@ import adminClient from "../support/util/AdminClient";
import CredentialsPage from "../support/pages/admin-ui/manage/users/CredentialsPage";
import UsersPage from "../support/pages/admin-ui/manage/users/UsersPage";
import IdentityProviderLinksTab from "../support/pages/admin-ui/manage/users/user_details/tabs/IdentityProviderLinksTab";
import RoleMappingTab from "../support/pages/admin-ui/manage/RoleMappingTab";
import CommonPage from "../support/pages/CommonPage";
let groupName = "group";
let groupsList: string[] = [];
@ -444,6 +446,10 @@ describe("User creation", () => {
});
describe("Accessibility tests for users", () => {
const a11yUser = "a11y-user";
const role = "admin";
const roleMappingTab = new RoleMappingTab("");
beforeEach(() => {
loginPage.logIn();
keycloakBefore();
@ -455,11 +461,113 @@ describe("User creation", () => {
cy.checkA11y();
});
it("Check a11y violations on create user form", () => {
it("Check a11y violations on empty create user form", () => {
createUserPage.goToCreateUser();
cy.checkA11y();
});
it("Check a11y violations on user details tab", () => {
createUserPage.goToCreateUser();
createUserPage.createUser(a11yUser);
userDetailsPage.fillUserData();
createUserPage.save();
cy.checkA11y();
});
it("Check a11y violations on user attributes tab", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
attributesTab.goToAttributesTab();
cy.checkA11y();
});
it("Check a11y violations on user credentials tab setting a password", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
credentialsPage.goToCredentialsTab();
credentialsPage
.clickEmptyStatePasswordBtn()
.fillPasswordForm()
.clickConfirmationBtn()
.clickSetPasswordBtn();
cy.checkA11y();
});
it("Check a11y violations on user credentials tab resetting a password", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
credentialsPage.goToCredentialsTab();
credentialsPage.clickResetBtn();
cy.checkA11y();
modalUtils.cancelModal();
});
it("Check a11y violations on user role mapping tab", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
roleMappingTab.goToRoleMappingTab();
cy.checkA11y();
});
it("Check a11y violations on user role mapping tab assigning a role dialog", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
roleMappingTab.goToRoleMappingTab();
cy.findByTestId("assignRole").click();
cy.checkA11y();
roleMappingTab.selectRow(role).assign();
});
it("Check a11y violations on user groups tab", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
userGroupsPage.goToGroupsTab();
cy.checkA11y();
});
it("Check a11y violations on user groups tab joining group dialog", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
userGroupsPage.goToGroupsTab();
cy.findByTestId("no-groups-empty-action").click();
cy.checkA11y();
});
it("Check a11y violations on user groups tab joining group", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
userGroupsPage.goToGroupsTab();
cy.findByTestId("no-groups-empty-action").click();
const groupsListCopy = groupsList.slice(0, 1);
groupsListCopy.forEach((element) => {
cy.findByTestId(`${element}-check`).click();
});
createUserPage.joinGroups();
cy.checkA11y();
});
it("Check a11y violations on user consents tab", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
userDetailsPage.goToConsentsTab();
cy.checkA11y();
});
it("Check a11y violations on user identity provider links tab", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
userDetailsPage.goToIdentityProviderLinksTab();
cy.checkA11y();
});
it("Check a11y violations on user sessions tab", () => {
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
userDetailsPage.goToSessionsTab();
cy.checkA11y();
});
it("Check a11y violations on user deleting dialog", () => {
const commonPage = new CommonPage();
usersPage.goToUserListTab().goToUserDetailsPage(a11yUser);
commonPage
.actionToolbarUtils()
.clickActionToggleButton()
.clickDropdownItem("Delete");
cy.checkA11y();
cy.findByTestId("confirm").click();
});
it("Check a11y violations on permissions tab", () => {
usersPage.goToPermissionsTab();
cy.checkA11y();

View file

@ -12,7 +12,7 @@ export default class RoleMappingTab {
private hideInheritedRolesBtn = "#hideInheritedRoles";
private assignedRolesTable = "assigned-roles";
private namesColumn = 'td[data-label="Name"]:visible';
private actionBtn = 'button[aria-label="Actions"]';
private roleMappingTab = "role-mapping-tab";
constructor(type: string) {
this.type = type;
@ -90,4 +90,9 @@ export default class RoleMappingTab {
}
return this;
}
goToRoleMappingTab() {
cy.findByTestId(this.roleMappingTab).click();
return this;
}
}

View file

@ -89,6 +89,11 @@ export default class GroupPage extends PageObject {
return this;
}
public showDeleteSelectedGroupsDialog() {
this.clickToolbarAction("Delete");
return this;
}
public deleteGroupItem(groupName: string, confirmModal = true) {
listingPage.deleteItem(groupName);
if (confirmModal) {
@ -186,4 +191,10 @@ export default class GroupPage extends PageObject {
);
return this;
}
public goToGroupActions(groupName: string) {
listingPage.clickRowDetails(groupName);
return this;
}
}

View file

@ -23,6 +23,7 @@ export default class GroupDetailPage extends GroupPage {
private renameGroupModalGroupNameInput = "groupNameInput";
private renameGroupModalRenameBtn = "renameGroup";
private permissionSwitch = "permissionSwitch";
public goToChildGroupsTab() {
cy.findByTestId(this.childGroupsTab).click();
return this;

View file

@ -3,9 +3,19 @@ import GroupDetailPage from "../GroupDetailPage";
export default class ChildGroupsTab extends GroupDetailPage {
protected createGroupEmptyStateBtn =
"no-groups-in-this-sub-group-empty-action";
protected createSubGroupBtn = "openCreateGroupModal";
public assertNoGroupsInThisSubGroupEmptyStateMessageExist(exist: boolean) {
super.assertEmptyStateExist(exist);
return this;
}
public openCreateSubGroupModal(emptyState: boolean) {
if (emptyState) {
cy.findByTestId(this.createGroupEmptyStateBtn).click();
} else {
cy.findByTestId(this.createSubGroupBtn).click();
}
return this;
}
}

View file

@ -12,7 +12,13 @@ export default class RealmSettingsPage extends CommonPage {
generalRevertBtn = "general-tab-revert";
themesSaveBtn = "themes-tab-save";
loginTab = "rs-login-tab";
emailTab = "rs-email-tab";
themesTab = "rs-themes-tab";
localizationTab = "rs-localization-tab";
securityDefensesTab = "rs-security-defenses-tab";
sessionsTab = "rs-sessions-tab";
userProfileTab = "rs-user-profile-tab";
tokensTab = "rs-tokens-tab";
selectLoginTheme = "#kc-login-theme";
loginThemeList = "#kc-login-theme + ul";
selectAccountTheme = "#kc-account-theme";
@ -1220,4 +1226,39 @@ export default class RealmSettingsPage extends CommonPage {
cy.findByTestId(this.jsonEditorSavePoliciesBtn).contains("Save");
cy.findByTestId(this.jsonEditorReloadBtn).contains("Reload");
}
goToLoginTab() {
cy.findByTestId(this.loginTab).click();
return this;
}
goToEmailTab() {
cy.findByTestId(this.emailTab).click();
return this;
}
goToThemesTab() {
cy.findByTestId(this.themesTab).click();
return this;
}
goToLocalizationTab() {
cy.findByTestId(this.localizationTab).click();
return this;
}
goToSecurityDefensesTab() {
cy.findByTestId(this.securityDefensesTab).click();
return this;
}
goToSessionsTab() {
cy.findByTestId(this.sessionsTab).click();
return this;
}
goToTokensTab() {
cy.findByTestId(this.tokensTab).click();
return this;
}
}

View file

@ -6,7 +6,8 @@ export default class CredentialsPage {
private readonly setPasswordBtn = "confirm";
private readonly credentialResetModal = "credential-reset-modal";
private readonly resetModalActionsToggleBtn =
"[data-testid=credential-reset-modal] #actions";
"[data-testid=credential-reset-modal] #actions-actions";
private readonly passwordField = "passwordField";
private readonly passwordConfirmationField = "passwordConfirmationField";
private readonly resetActions = [

View file

@ -12,6 +12,8 @@ export default class UserDetailsPage extends PageObject {
lastNameValue: string;
requiredUserActions: RequiredActionAlias[];
identityProviderLinksTab: string;
consentsTab: string;
sessionsTab: string;
constructor() {
super();
@ -26,6 +28,8 @@ export default class UserDetailsPage extends PageObject {
this.lastNameValue = "lastname";
this.requiredUserActions = [RequiredActionAlias.UPDATE_PASSWORD];
this.identityProviderLinksTab = "identity-provider-links-tab";
this.consentsTab = "user-consents-tab";
this.sessionsTab = "user-sessions-tab";
}
public goToIdentityProviderLinksTab() {
@ -55,4 +59,14 @@ export default class UserDetailsPage extends PageObject {
return this;
}
goToConsentsTab() {
cy.findByTestId(this.consentsTab).click();
return this;
}
goToSessionsTab() {
cy.findByTestId(this.sessionsTab).click();
return this;
}
}

View file

@ -55,7 +55,7 @@ export const RequiredActionMultiSelect = ({
render={({ field }) => (
<Select
maxHeight={375}
toggleId="actions"
toggleId={`${name}-actions`}
variant={SelectVariant.typeaheadMulti}
chipGroupProps={{
numChips: 3,