com.atlassian.jira.pageobjects.pages.admin.user
Class UserBrowserPage

java.lang.Object
  extended by com.atlassian.jira.pageobjects.pages.AbstractJiraPage
      extended by com.atlassian.jira.pageobjects.pages.AbstractJiraAdminPage
          extended by com.atlassian.jira.pageobjects.pages.admin.user.UserBrowserPage
All Implemented Interfaces:
com.atlassian.pageobjects.Page

public class UserBrowserPage
extends AbstractJiraAdminPage

Admin user browser.

Since:
v4.4

Nested Class Summary
static class UserBrowserPage.FilterForm
           
static class UserBrowserPage.UserRow
          Encapsulates single row in the user browser.
 
Field Summary
protected  com.atlassian.pageobjects.elements.PageElement addUserLink
           
protected  ExtendedElementFinder extendedFinder
           
protected  org.openqa.selenium.WebElement filterSubmit
           
protected  org.openqa.selenium.WebElement filterUsersByEmail
           
protected  org.openqa.selenium.WebElement filterUsersByUserName
           
protected  com.atlassian.pageobjects.elements.SelectElement filterUsersPerPage
           
protected  com.atlassian.pageobjects.elements.PageElement numUsers
           
protected  com.atlassian.pageobjects.elements.PageElement pagination
           
protected  Iterable<com.atlassian.pageobjects.elements.PageElement> userRows
           
protected  com.atlassian.pageobjects.elements.PageElement userTable
           
 
Fields inherited from class com.atlassian.jira.pageobjects.pages.AbstractJiraPage
body, driver, elementFinder, footerElement, metaElement, pageBinder, timeouts
 
Constructor Summary
UserBrowserPage()
           
 
Method Summary
 UserBrowserPage addUser(User user, boolean sendPasswordEmail)
          Takes User object and fills out the addUserPage form and creates the user.
 EditUserGroupsPage editUserGroups(User user)
          Deprecated. use findRow(com.atlassian.jira.pageobjects.global.User) instead
 UserBrowserPage filterByEmail(String email)
           
 UserBrowserPage filterByUserName(String username)
           
 UserBrowserPage.UserRow findRow(String userName)
           
 UserBrowserPage.UserRow findRow(User user)
          Find row for given user
 int getNumberOfUsers()
           
 String getUrl()
           
 Iterable<UserBrowserPage.UserRow> getUserRows()
           
 com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<UserBrowserPage.UserRow>> getUserRowsTimed()
           
 Set<String> getUsersGroups(User user)
          Deprecated. use findRow(com.atlassian.jira.pageobjects.global.User) instead
 AddUserPage gotoAddUserPage()
          Navigates to the addUserPage by activating the add User link
 UserBrowserPage gotoResultPage(int page)
           
 ViewUserPage gotoViewUserPage(User user)
          Deprecated. use findRow(com.atlassian.jira.pageobjects.global.User) instead
 boolean hasRow(User user)
           
 boolean hasUser(User user)
           
 void init()
           
 com.atlassian.pageobjects.elements.query.TimedCondition isAt()
          Timed condition checking if we're at given page.
 String linkId()
          ID of the link in the admin menu.
 UserBrowserPage setUserFilterTo10Users()
           
 UserBrowserPage setUserFilterToShowAllUsers()
           
 
Methods inherited from class com.atlassian.jira.pageobjects.pages.AbstractJiraAdminPage
adminMenu
 
Methods inherited from class com.atlassian.jira.pageobjects.pages.AbstractJiraPage
back, createXsrfUrl, doWait, execKeyboardShortcut, getHeader, getPageTitle, getXsrfToken, isAdmin, isLoggedIn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extendedFinder

@Inject
protected ExtendedElementFinder extendedFinder

filterSubmit

protected org.openqa.selenium.WebElement filterSubmit

addUserLink

protected com.atlassian.pageobjects.elements.PageElement addUserLink

numUsers

protected com.atlassian.pageobjects.elements.PageElement numUsers

pagination

protected com.atlassian.pageobjects.elements.PageElement pagination

userTable

protected com.atlassian.pageobjects.elements.PageElement userTable

filterUsersByUserName

protected org.openqa.selenium.WebElement filterUsersByUserName

filterUsersByEmail

protected org.openqa.selenium.WebElement filterUsersByEmail

filterUsersPerPage

protected com.atlassian.pageobjects.elements.SelectElement filterUsersPerPage

userRows

protected Iterable<com.atlassian.pageobjects.elements.PageElement> userRows
Constructor Detail

UserBrowserPage

public UserBrowserPage()
Method Detail

getUrl

public String getUrl()

isAt

public com.atlassian.pageobjects.elements.query.TimedCondition isAt()
Description copied from class: AbstractJiraPage
Timed condition checking if we're at given page.

Specified by:
isAt in class AbstractJiraPage
Returns:
timed condition checking, if the test is at given page

init

public void init()

hasUser

public boolean hasUser(User user)

editUserGroups

public EditUserGroupsPage editUserGroups(User user)
Deprecated. use findRow(com.atlassian.jira.pageobjects.global.User) instead

When editing a users groups from this page, EditUserGroups always returns back to UserBrowser unless there was an error.

Parameters:
user - user to edit
Returns:
edit user groups page instance

getUsersGroups

@Deprecated
public Set<String> getUsersGroups(User user)
Deprecated. use findRow(com.atlassian.jira.pageobjects.global.User) instead

Parameters:
user - blah
Returns:
blah

gotoViewUserPage

public ViewUserPage gotoViewUserPage(User user)
Deprecated. use findRow(com.atlassian.jira.pageobjects.global.User) instead

Parameters:
user - blah
Returns:
blah

getNumberOfUsers

public int getNumberOfUsers()

gotoResultPage

public UserBrowserPage gotoResultPage(int page)

gotoAddUserPage

public AddUserPage gotoAddUserPage()
Navigates to the addUserPage by activating the add User link

Returns:
add user page

addUser

public UserBrowserPage addUser(User user,
                               boolean sendPasswordEmail)
Takes User object and fills out the addUserPage form and creates the user.

Parameters:
user - the user to create
sendPasswordEmail - sets the send email tick box to on or off
Returns:
the user browser page which should have the new user added to the count.

filterByUserName

public UserBrowserPage filterByUserName(String username)

filterByEmail

public UserBrowserPage filterByEmail(String email)

setUserFilterToShowAllUsers

public UserBrowserPage setUserFilterToShowAllUsers()

setUserFilterTo10Users

public UserBrowserPage setUserFilterTo10Users()

getUserRows

public Iterable<UserBrowserPage.UserRow> getUserRows()

getUserRowsTimed

public com.atlassian.pageobjects.elements.query.TimedQuery<Iterable<UserBrowserPage.UserRow>> getUserRowsTimed()

hasRow

public boolean hasRow(User user)

findRow

public UserBrowserPage.UserRow findRow(User user)
Find row for given user

Parameters:
user - user to find
Returns:
user row
Throws:
NoSuchElementException - if no user row found for given user (use hasRow(com.atlassian.jira.pageobjects.global.User) to check)

findRow

public UserBrowserPage.UserRow findRow(String userName)

linkId

public String linkId()
Description copied from class: AbstractJiraAdminPage
ID of the link in the admin menu.

Specified by:
linkId in class AbstractJiraAdminPage
Returns:
ID of the link to this page


Copyright © 2002-2014 Atlassian. All Rights Reserved.