wip: realm_test fix/improvement attempt (#2446)
* test fix attempt * test fix attempt 2 * test fix attempt 3 * test fix attempt 4 * test fix attempt 4 * cleanup * fix for client test * fix attempt 5 Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
This commit is contained in:
parent
4d0a1e5c2e
commit
45746e7660
10 changed files with 1 additions and 19 deletions
|
@ -66,6 +66,7 @@ describe("Realms test", () => {
|
||||||
|
|
||||||
it("should create Test Disabled realm", () => {
|
it("should create Test Disabled realm", () => {
|
||||||
sidebarPage.goToCreateRealm();
|
sidebarPage.goToCreateRealm();
|
||||||
|
sidebarPage.waitForPageLoad();
|
||||||
createRealmPage.fillRealmName("Test Disabled").createRealm();
|
createRealmPage.fillRealmName("Test Disabled").createRealm();
|
||||||
createRealmPage.disableRealm();
|
createRealmPage.disableRealm();
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
export default class CreateRealmPage {
|
export default class CreateRealmPage {
|
||||||
private browseBtn = "#kc-realm-filename-browse-button";
|
|
||||||
private clearBtn = ".pf-c-file-upload__file-select button:last-child";
|
private clearBtn = ".pf-c-file-upload__file-select button:last-child";
|
||||||
private modalClearBtn = "clear-button";
|
private modalClearBtn = "clear-button";
|
||||||
private realmFileNameInput = "#kc-realm-filename";
|
|
||||||
private realmNameInput = "#kc-realm-name";
|
private realmNameInput = "#kc-realm-name";
|
||||||
private enabledSwitch =
|
private enabledSwitch =
|
||||||
'[for="kc-realm-enabled-switch"] span.pf-c-switch__toggle';
|
'[for="kc-realm-enabled-switch"] span.pf-c-switch__toggle';
|
||||||
|
|
|
@ -34,7 +34,6 @@ export default class ListingPage {
|
||||||
private emptyListImg =
|
private emptyListImg =
|
||||||
'[role="tabpanel"]:not([hidden]) [data-testid="empty-state"]';
|
'[role="tabpanel"]:not([hidden]) [data-testid="empty-state"]';
|
||||||
public emptyState = "empty-state";
|
public emptyState = "empty-state";
|
||||||
private progressBar = '[role="progressbar"]';
|
|
||||||
private itemRowDrpDwn = ".pf-c-dropdown__toggle";
|
private itemRowDrpDwn = ".pf-c-dropdown__toggle";
|
||||||
private itemRowSelect = ".pf-c-select__toggle:nth-child(1)";
|
private itemRowSelect = ".pf-c-select__toggle:nth-child(1)";
|
||||||
private itemRowSelectItem = ".pf-c-select__menu-item";
|
private itemRowSelectItem = ".pf-c-select__menu-item";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
export default class Masthead {
|
export default class Masthead {
|
||||||
private menuBtn = "#nav-toggle";
|
|
||||||
private logoBtn = "#masthead-logo";
|
private logoBtn = "#masthead-logo";
|
||||||
private helpBtn = "#help";
|
private helpBtn = "#help";
|
||||||
private closeAlertMessageBtn = ".pf-c-alert__action button";
|
private closeAlertMessageBtn = ".pf-c-alert__action button";
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
export default class ClientRolesTab {
|
export default class ClientRolesTab {
|
||||||
private createRoleBtn = "create-role";
|
private createRoleBtn = "create-role";
|
||||||
private createRoleEmptyStateBtn = "no-roles-for-this-client-empty-action";
|
private createRoleEmptyStateBtn = "no-roles-for-this-client-empty-action";
|
||||||
private actionsDropdown = `[aria-label="Actions"]`;
|
|
||||||
private hideInheritedRolesChkBox = "#kc-hide-inherited-roles-checkbox";
|
private hideInheritedRolesChkBox = "#kc-hide-inherited-roles-checkbox";
|
||||||
|
|
||||||
private rolesTab = "rolesTab";
|
private rolesTab = "rolesTab";
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
export default class CreateClientPage {
|
export default class CreateClientPage {
|
||||||
private clientTypeDrpDwn = ".pf-c-select__toggle";
|
private clientTypeDrpDwn = ".pf-c-select__toggle";
|
||||||
private clientTypeError = ".pf-c-select + div";
|
|
||||||
private clientTypeList = ".pf-c-select__toggle + ul";
|
private clientTypeList = ".pf-c-select__toggle + ul";
|
||||||
private clientIdInput = "#kc-client-id";
|
private clientIdInput = "#kc-client-id";
|
||||||
private clientIdError = "#kc-client-id + div";
|
private clientIdError = "#kc-client-id + div";
|
||||||
|
@ -44,8 +43,6 @@ export default class CreateClientPage {
|
||||||
private frontChannelLogoutSwitchInput = "#frontchannelLogout";
|
private frontChannelLogoutSwitchInput = "#frontchannelLogout";
|
||||||
private frontChannelLogoutInput = "#frontchannelLogoutUrl";
|
private frontChannelLogoutInput = "#frontchannelLogoutUrl";
|
||||||
private backChannelLogoutInput = "#backchannelLogoutUrl";
|
private backChannelLogoutInput = "#backchannelLogoutUrl";
|
||||||
private backChannelLogoutRequiredSwitch =
|
|
||||||
'[for="backchannelLogoutSessionRequired"] > .pf-c-switch__toggle';
|
|
||||||
private backChannelLogoutRequiredSwitchInput =
|
private backChannelLogoutRequiredSwitchInput =
|
||||||
"#backchannelLogoutSessionRequired";
|
"#backchannelLogoutSessionRequired";
|
||||||
private backChannelLogoutRevoqueSwitch =
|
private backChannelLogoutRevoqueSwitch =
|
||||||
|
|
|
@ -6,13 +6,10 @@ export default class AddMapperPage {
|
||||||
private addMapperButton = "#add-mapper-button";
|
private addMapperButton = "#add-mapper-button";
|
||||||
|
|
||||||
private mapperNameInput = "#kc-name";
|
private mapperNameInput = "#kc-name";
|
||||||
private mapperRoleInput = "mapper-role-input";
|
|
||||||
private attribute = "user.attribute";
|
private attribute = "user.attribute";
|
||||||
private attributeName = "attribute.name";
|
private attributeName = "attribute.name";
|
||||||
private attributeFriendlyName = "attribute.friendly.name";
|
private attributeFriendlyName = "attribute.friendly.name";
|
||||||
private attributeValue = "attribute-value";
|
|
||||||
private claimInput = "claim";
|
private claimInput = "claim";
|
||||||
private claimValueInput = "claim-value-input";
|
|
||||||
private socialProfileJSONfieldPath = "jsonField";
|
private socialProfileJSONfieldPath = "jsonField";
|
||||||
private userAttribute = "attribute";
|
private userAttribute = "attribute";
|
||||||
private userAttributeName = "userAttribute";
|
private userAttributeName = "userAttribute";
|
||||||
|
@ -26,7 +23,6 @@ export default class AddMapperPage {
|
||||||
private attributesValueInput = 'input[name="config.attributes[0].value"]';
|
private attributesValueInput = 'input[name="config.attributes[0].value"]';
|
||||||
private template = "template";
|
private template = "template";
|
||||||
private target = "#target";
|
private target = "#target";
|
||||||
private targetDropdown = "#target-dropdown";
|
|
||||||
|
|
||||||
goToMappersTab() {
|
goToMappersTab() {
|
||||||
cy.findByTestId(this.mappersTab).click();
|
cy.findByTestId(this.mappersTab).click();
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
export default class CreateProviderPage {
|
export default class CreateProviderPage {
|
||||||
private github = "github";
|
private github = "github";
|
||||||
private addProviderDropdown = "addProviderDropdown";
|
|
||||||
private clientIdField = "clientId";
|
private clientIdField = "clientId";
|
||||||
private clientIdError = "#kc-client-secret-helper";
|
private clientIdError = "#kc-client-secret-helper";
|
||||||
private clientSecretField = "clientSecret";
|
private clientSecretField = "clientSecret";
|
||||||
|
|
|
@ -2,7 +2,6 @@ export default class AssociatedRolesPage {
|
||||||
private actionDropdown = "action-dropdown";
|
private actionDropdown = "action-dropdown";
|
||||||
private addRolesDropdownItem = "add-roles";
|
private addRolesDropdownItem = "add-roles";
|
||||||
private addRoleToolbarButton = "add-role-button";
|
private addRoleToolbarButton = "add-role-button";
|
||||||
private checkbox = "[type=checkbox]";
|
|
||||||
private addAssociatedRolesModalButton = "add-associated-roles-button";
|
private addAssociatedRolesModalButton = "add-associated-roles-button";
|
||||||
private compositeRoleBadge = "composite-role-badge";
|
private compositeRoleBadge = "composite-role-badge";
|
||||||
private filterTypeDropdown = "filter-type-dropdown";
|
private filterTypeDropdown = "filter-type-dropdown";
|
||||||
|
|
|
@ -169,8 +169,6 @@ export default class RealmSettingsPage {
|
||||||
private saveNewClientPolicyBtn = "saveCreatePolicy";
|
private saveNewClientPolicyBtn = "saveCreatePolicy";
|
||||||
private cancelNewClientPolicyBtn = "cancelCreatePolicy";
|
private cancelNewClientPolicyBtn = "cancelCreatePolicy";
|
||||||
private alertMessage = ".pf-c-alert__title";
|
private alertMessage = ".pf-c-alert__title";
|
||||||
private moreDrpDwn = ".pf-c-dropdown__toggle.pf-m-plain";
|
|
||||||
private moreDrpDwnItems = ".pf-c-dropdown__menu-item";
|
|
||||||
private modalDialogTitle = ".pf-c-modal-box__title-text";
|
private modalDialogTitle = ".pf-c-modal-box__title-text";
|
||||||
private modalDialogBodyText = ".pf-c-modal-box__body";
|
private modalDialogBodyText = ".pf-c-modal-box__body";
|
||||||
private deleteDialogCancelBtn = "#modal-cancel";
|
private deleteDialogCancelBtn = "#modal-cancel";
|
||||||
|
@ -178,7 +176,6 @@ export default class RealmSettingsPage {
|
||||||
private jsonEditorSavePoliciesBtn = "jsonEditor-policies-saveBtn";
|
private jsonEditorSavePoliciesBtn = "jsonEditor-policies-saveBtn";
|
||||||
private jsonEditorReloadBtn = "jsonEditor-reloadBtn";
|
private jsonEditorReloadBtn = "jsonEditor-reloadBtn";
|
||||||
private jsonEditor = ".monaco-scrollable-element.editor-scrollable.vs";
|
private jsonEditor = ".monaco-scrollable-element.editor-scrollable.vs";
|
||||||
private createClientDrpDwn = ".pf-c-dropdown.pf-m-align-right";
|
|
||||||
private clientPolicyDrpDwn = '[data-testid="action-dropdown"] button';
|
private clientPolicyDrpDwn = '[data-testid="action-dropdown"] button';
|
||||||
private deleteclientPolicyDrpDwn = "deleteClientPolicyDropdown";
|
private deleteclientPolicyDrpDwn = "deleteClientPolicyDropdown";
|
||||||
private clientProfileOne =
|
private clientProfileOne =
|
||||||
|
@ -204,7 +201,6 @@ export default class RealmSettingsPage {
|
||||||
private addConditionDrpDwnOption = "conditionType-select";
|
private addConditionDrpDwnOption = "conditionType-select";
|
||||||
private addConditionCancelBtn = "addCondition-cancelBtn";
|
private addConditionCancelBtn = "addCondition-cancelBtn";
|
||||||
private addConditionSaveBtn = "addCondition-saveBtn";
|
private addConditionSaveBtn = "addCondition-saveBtn";
|
||||||
private conditionTypeLink = "condition-type-link";
|
|
||||||
private clientRolesConditionLink = "client-roles-condition-link";
|
private clientRolesConditionLink = "client-roles-condition-link";
|
||||||
private clientScopesConditionLink = "client-scopes-condition-link";
|
private clientScopesConditionLink = "client-scopes-condition-link";
|
||||||
private eventListenersFormLabel = ".pf-c-form__label-text";
|
private eventListenersFormLabel = ".pf-c-form__label-text";
|
||||||
|
@ -222,7 +218,6 @@ export default class RealmSettingsPage {
|
||||||
private deleteClientRolesConditionBtn = "delete-client-roles-condition";
|
private deleteClientRolesConditionBtn = "delete-client-roles-condition";
|
||||||
private deleteClientScopesConditionBtn = "delete-client-scopes-condition";
|
private deleteClientScopesConditionBtn = "delete-client-scopes-condition";
|
||||||
private realmDisplayName = "#kc-display-name";
|
private realmDisplayName = "#kc-display-name";
|
||||||
private displayNameHTML = "#kc-html-display-name";
|
|
||||||
private frontEndURL = "#kc-frontend-url";
|
private frontEndURL = "#kc-frontend-url";
|
||||||
private requireSSL = "#kc-require-ssl";
|
private requireSSL = "#kc-require-ssl";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue