Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Select Git revision
  • ea8ca511cc69fb23f27aa5b036b8a23ff20ce2c2
  • development default
  • bugfix/EDELIVERY-14172-domismp-accepts-requests-with-wrong-domain-header-value
  • EDELIVERY-15372-upgrade-libraries-and-plugins-and-update-httpclient-to-httpclient5
  • EDELIVERY-15377-migrate-to-angular-20
  • feature/EDELIVERY-15382-rest-api-jwt-authentication-for-dynamic-discovery-client
  • bugfix/EDELIVERY-14196-select-domain-select-resource-dropdown-should-be-order-alphabetically
  • feature/EDELIVERY-12753-sml-integration-migration-to-different-smp
  • feature/EDELIVERY-13757-extend-session-dialog-should-have-an-active-counter
  • EDELIVERY-15144-sql-update
  • bugfix/EDELIVERY-14326-ui-edit-resource-filters
  • feature/EDELIVERY-15144-domismp-system-notification-generalize-time-expiration-alerts
  • bugfix/EDELIVERY-15102-alert-is-not-appearing-when-adding-duplicated-certificate
  • bugfix/EDELIVERY-15203-small-left-grid-shows-no-data-found-for-1-2-seconds-before-loading-the-data
  • EDELIVERY-15219-search-filter-with-understore-char-does-not-work
  • bugfix/EDELIVERY-15226-certificates-error-when-trying-to-delete-certificates
  • bugfix/EDELIVERY-15224-error-when-trying-to-update-info-from-profile-page
  • bugfix/EDELIVERY-15225-emails-are-not-sent-in-domismp
  • release/5.1.x
  • feature/EDELIVERY-12746-external-secret-sharing-services-as-vaults
  • EDELIVERY-15229-upgrade-libraries-and-plugins
  • 5.1.1
  • 5.1
  • 5.1-TEST
  • 5.1-RC1
  • 5.0.1
  • 5.0
  • 5.0-RC1
  • 4.2
  • 4.2-RC1
  • 4.1.2
  • 4.1.1
  • 4.1.0
  • 4.1.0-RC1
  • 4.0.0
  • 4.0.0-RC1
  • 3.0.2
  • 3.0.1
  • 3.0.0
39 results

DomainsPage.java

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    UsersPage.java 2.46 KiB
    package pages.systemSettings;
    
    import ddsl.CommonPageWithTabsAndGrid;
    import ddsl.dcomponents.commonComponents.UserDataCommonComponent;
    import ddsl.dobjects.DButton;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebElement;
    import org.openqa.selenium.support.FindBy;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import rest.models.UserModel;
    
    public class UsersPage extends CommonPageWithTabsAndGrid {
        /**
         * Page object for the Users page. This contains the locators of the page and the methods for the behaviour of the page
         */
        private final static Logger LOG = LoggerFactory.getLogger(UsersPage.class);
    
        public UserDataCommonComponent userData;
        @FindBy(id = "username_id")
        private WebElement usernameInput;
        @FindBy(id = "role_id")
        private WebElement applicationRoleDdl;
        @FindBy(id = "active_id")
        private WebElement isActive;
    
    
        public UsersPage(WebDriver driver) {
            super(driver);
            userData = new UserDataCommonComponent(driver);
            LOG.debug("Loading Users page.");
        }
    
        public DButton getCreateUserBtn() {
            return new DButton(driver, addBtn);
        }
    
        public String fillNewUserDataAndSave(UserModel newUserData) {
            LOG.debug("Filling user data...");
            try {
                weToDInput(usernameInput).fill(newUserData.getUsername());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
            weToDSelect(applicationRoleDdl).selectValue(newUserData.getRole());
    
            String alertMessage = userData.fillUserProfileData(newUserData.getEmailAddress(), newUserData.getFullName(), newUserData.getSmpTheme(), newUserData.getSmpLocale());
            LOG.debug("User {} was created", newUserData.getUsername());
            return alertMessage;
        }
    
        public String getApplicationRoleValue() {
            return weToDSelect(applicationRoleDdl).getCurrentValue();
        }
    
        public String getFullNameValue() {
            return userData.getFullName();
        }
    
        public Boolean isSelectedUserActive() {
            try {
                return weToDInput(isActive).getAttribute("class").contains("checked");
    
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    
        public String getEmailValue() {
            return userData.getEmailAddress();
        }
    
        public String getSelectedThemeValue() {
            return userData.getSelectedTheme();
        }
    
        public String getSelectedLocaleValue() {
            return userData.getSelectedLocale();
        }
    
    
    }