Class ConfluenceNavigation

java.lang.Object
com.atlassian.jira.webtests.ztests.applinks.confluence.ConfluenceNavigation
All Implemented Interfaces:
Navigation

public class ConfluenceNavigation extends Object implements Navigation
  • Constructor Details

    • ConfluenceNavigation

      public ConfluenceNavigation(net.sourceforge.jwebunit.WebTester tester)
  • Method Details

    • login

      public void login(String userName)
      Description copied from interface: Navigation
      This assumes the standard JIRA test behaviour of having the user name the same value as the password
      Specified by:
      login in interface Navigation
      Parameters:
      userName - the user name and password to login as
    • login

      public void login(String userName, String userPassword)
      Description copied from interface: Navigation
      Login the given user.

      Note that this will assert that the login suceeded.

      Specified by:
      login in interface Navigation
      Parameters:
      userName - the user name and password to login as
      See Also:
    • loginAttempt

      public void loginAttempt(String userName, String userPassword)
      Description copied from interface: Navigation
      Attempts to login the given user without asserting success.
      Specified by:
      loginAttempt in interface Navigation
      Parameters:
      userName -
      userPassword -
    • login

      public void login(String userName, String userPassword, boolean useCookie)
      Specified by:
      login in interface Navigation
    • doLogin

      public void doLogin(String userName, String userPassword, boolean useCookie, boolean assertSuccess)
    • loginUsingForm

      public void loginUsingForm(String userName, String userPassword)
      Specified by:
      loginUsingForm in interface Navigation
    • loginUsingForm

      public void loginUsingForm(String userName, String userPassword, boolean useCookie, boolean assertSuccess)
      Description copied from interface: Navigation
      Login by navigating to the Dashboard and filling out the login form and submitting it
      Specified by:
      loginUsingForm in interface Navigation
      Parameters:
      userName -
      userPassword -
      useCookie -
      assertSuccess -
    • loginUsingURLParameters

      public void loginUsingURLParameters(String userName, String userPassword, boolean useCookie)
      Description copied from interface: Navigation
      Login by adding parameters to the Dashboard URL

      e.g. http://localhost:8090/jira/secure/Dashboard.jspa?os_username=admininvalid input: '&os_password'=admin

      Specified by:
      loginUsingURLParameters in interface Navigation
      Parameters:
      userName -
      userPassword -
      useCookie -
    • logout

      public void logout()
      Description copied from interface: Navigation
      Logout current user.
      Specified by:
      logout in interface Navigation
    • getCurrentPage

      public String getCurrentPage()
      Description copied from interface: Navigation
      Returns the relative path of the current page. E.g. if currently at http://web.com:9999/jira/browse/HSP-1, this method will return "/browse/HSP-1". Also caters for situations when no context path is set, e.g. http://standalone.com/browse/HSP-1.

      Use this method with WebTester.gotoPage(java.lang.String).

      Specified by:
      getCurrentPage in interface Navigation
      Returns:
      the relative path of the current page.
    • clickLink

      public void clickLink(com.meterware.httpunit.WebLink webLink)
      Description copied from interface: Navigation
      Follows the URL in the given WebLink.
      Specified by:
      clickLink in interface Navigation
      Parameters:
      webLink - WebLink
    • clickLinkWithPost

      public void clickLinkWithPost(com.meterware.httpunit.WebLink webLink, InputStream bodyInputStream)
      Description copied from interface: Navigation
      Follows the URL in the given WebLink using PostMethodWebRequest with body defined by bodyInputStream.
      Specified by:
      clickLinkWithPost in interface Navigation
      Parameters:
      webLink - WebLink
      bodyInputStream - POST request body
    • clickLinkWithPost

      public void clickLinkWithPost(com.meterware.httpunit.WebLink webLink)
      Description copied from interface: Navigation
      Follows the URL in the given WebLink using PostMethodWebRequest with body containing XSRF token only.
      Specified by:
      clickLinkWithPost in interface Navigation
      Parameters:
      webLink - WebLink
    • sendPostRequest

      public void sendPostRequest(String url, InputStream bodyInputStream)
      Description copied from interface: Navigation
      Visits the site with POST method.
      Specified by:
      sendPostRequest in interface Navigation
      Parameters:
      url - relative url to visit
      bodyInputStream - input stream sent as request body
    • clickLinkWithExactText

      public void clickLinkWithExactText(String text)
      Description copied from interface: Navigation
      Finds the first link on the page with the exact text and follows the URL.

      Note: This is not the same as WebTester.clickLinkWithText(String) as it does an exact text match, but also no onclick events are fired. It simply follows the URL specified by the link tag.

      Specified by:
      clickLinkWithExactText in interface Navigation
      Parameters:
      text - the text of the link to match
    • clickLinkInTableCell

      public void clickLinkInTableCell(String tableId, int row, int col, String linkText)
      Description copied from interface: Navigation
      Click on a link in a particular table cell with the given text.
      Specified by:
      clickLinkInTableCell in interface Navigation
      Parameters:
      tableId - The id of the table whose link we're clicking
      row - The table row that contains the link
      col - The table column that contains the link
      linkText - The text of the link
    • clickLinkInTableCell

      public void clickLinkInTableCell(com.meterware.httpunit.WebTable table, int row, int col, String linkText)
      Description copied from interface: Navigation
      Click on a link in a particular table cell with the given text.
      Specified by:
      clickLinkInTableCell in interface Navigation
      Parameters:
      table - The table whose link we're clicking
      row - The table row that contains the link
      col - The table column that contains the link
      linkText - The text of the link
    • jiraLog

      public void jiraLog(String logMessage)
      Description copied from interface: Navigation
      Writes the specified message to the atlassian-jira.log on the server side. Works because we have a magic servlet ready for this log messages.
      Specified by:
      jiraLog in interface Navigation
      Parameters:
      logMessage - the message to log
    • gotoPage

      public void gotoPage(String url)
      Description copied from interface: Navigation
      Navigates to the given relative URL.

      Note that the "base URL" is automatically prepended to the given URL including the context. eg: If the URL on your dev machine is "http://localhost:8091/jira/secure/Signup!default.jspa", then you would supply "secure/Signup!default.jspa" as the URL parameter to this method.

      Specified by:
      gotoPage in interface Navigation
      Parameters:
      url - URL to navigate to.
    • bindPage

      public <T extends WebTestPage> T bindPage(Class<T> pageClass)
      Specified by:
      bindPage in interface Navigation
    • gotoPage

      public <T extends WebTestPage> T gotoPage(Class<T> pageClass)
      Specified by:
      gotoPage in interface Navigation
    • gotoPageWithParams

      public <T extends WebTestPage> T gotoPageWithParams(Class<T> pageClass, String params)
      Specified by:
      gotoPageWithParams in interface Navigation
    • gotoResource

      public void gotoResource(String resourcePath)
      Description copied from interface: Navigation

      Navigates to the relative resource path.

      Note that the This method will prepend current location to the resource path, e.g. if the current location is "http://localhost:8091/jira/secure/Signup!default.jspa", and given resource is "Signout.jspa, the resulting URL will be "http://localhost:8091/jira/secure/Signout.jspa".

      Specified by:
      gotoResource in interface Navigation
      Parameters:
      resourcePath - path to navigate to.
    • gotoDashboard

      public void gotoDashboard()
      Description copied from interface: Navigation
      Goto the current user's dashboard. This is a quick way to call dashboard().navigateTo().
      Specified by:
      gotoDashboard in interface Navigation
    • gotoAdmin

      public void gotoAdmin()
      Description copied from interface: Navigation
      Navigates to the admin section
      Specified by:
      gotoAdmin in interface Navigation
    • webSudoAuthenticate

      public void webSudoAuthenticate(String password)
      Description copied from interface: Navigation
      Checks if we have been redirected to the websudo login form and logs in.
      Specified by:
      webSudoAuthenticate in interface Navigation
      Parameters:
      password -
    • webSudoAuthenticateUsingLastPassword

      public void webSudoAuthenticateUsingLastPassword()
      Description copied from interface: Navigation
      Checks if we have been redirected to the websudo login form and logs in using the last password
      Specified by:
      webSudoAuthenticateUsingLastPassword in interface Navigation
    • disableWebSudo

      public void disableWebSudo()
      Description copied from interface: Navigation
      Historically this connected to a REST endpoint in the jira-functest-plugin to disable WebSudo Currently this does nothing
      Specified by:
      disableWebSudo in interface Navigation
    • gotoAdminSection

      public void gotoAdminSection(Navigation.AdminSection section)
      Description copied from interface: Navigation
      Navigates to a particular AdminSection.
      Specified by:
      gotoAdminSection in interface Navigation
      Parameters:
      section - the section to navigate to
    • gotoCustomFields

      public void gotoCustomFields()
      Description copied from interface: Navigation
      Navigates to the 'Custom Fields' page in the administration section
      Specified by:
      gotoCustomFields in interface Navigation
    • gotoWorkflows

      public void gotoWorkflows()
      Description copied from interface: Navigation
      Navigates to the workflows table in the admin section
      Specified by:
      gotoWorkflows in interface Navigation
    • runReport

      public void runReport(Long projectId, String reportKey)
      Description copied from interface: Navigation
      Run the given report for the given project
      Specified by:
      runReport in interface Navigation
      Parameters:
      projectId - The id of the project
      reportKey - The key of the report.
    • runReport

      public void runReport(Long projectId, String reportKey, Long filterId, String mapper)
      Description copied from interface: Navigation
      Run the given report for the given project using the given mapper
      Specified by:
      runReport in interface Navigation
      Parameters:
      projectId - The id of the project
      reportKey - The key of the report
      filterId - The filter id used for the report
      mapper - The mapper used for the report (e.g. "labels")
    • browseProject

      public void browseProject(String projectKey)
      Description copied from interface: Navigation
      Navigates to the project's Browse page
      Specified by:
      browseProject in interface Navigation
      Parameters:
      projectKey - the key of the project e.g. "HSP"
    • browseProjectTabPanel

      public void browseProjectTabPanel(String projectKey, String tab)
      Description copied from interface: Navigation
      Navigates to the project tab panel for the specified project.
      Specified by:
      browseProjectTabPanel in interface Navigation
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      tab - the key of the project tab panel e.g. "summary", "issues", "changelog", etc.
    • browseComponentTabPanel

      public void browseComponentTabPanel(String projectKey, String componentName, String tab)
      Description copied from interface: Navigation
      Navigates to the component tab panel for the specified component.
      Specified by:
      browseComponentTabPanel in interface Navigation
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      componentName - the name of the component e.g. "New Component 1"
      tab - the key of the project tab panel e.g. "summary", "issues", "changelog", etc.
    • browseVersionTabPanel

      public void browseVersionTabPanel(String projectKey, String versionName, String tab)
      Description copied from interface: Navigation
      Navigates to the component tab panel for the specified component.
      Specified by:
      browseVersionTabPanel in interface Navigation
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      versionName - the name of the version e.g. "New Version 1"
      tab - the key of the project tab panel e.g. "summary", "issues", "changelog", etc.
    • browseComponentTabPanel

      public void browseComponentTabPanel(String projectKey, String componentName)
      Description copied from interface: Navigation
      Navigates to Browse Component page of the specified component
      Specified by:
      browseComponentTabPanel in interface Navigation
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      componentName - the name of the component e.g. "New Component 1"
    • browseVersionTabPanel

      public void browseVersionTabPanel(String projectKey, String versionName)
      Description copied from interface: Navigation
      Navigates to Browse Version page of the specified component
      Specified by:
      browseVersionTabPanel in interface Navigation
      Parameters:
      projectKey - the key of the project e.g. "HSP"
      versionName - the name of the version e.g. "New Version 1"
    • manageFilters

      public FilterNavigation manageFilters()
      Description copied from interface: Navigation
      Go to the 'Manage filters' screen. Access API to navigate through issue filters.
      Specified by:
      manageFilters in interface Navigation
      Returns:
      filter navigation
    • issue

      public IssueNavigation issue()
      Description copied from interface: Navigation
      Access API to navigate through issues.
      Specified by:
      issue in interface Navigation
      Returns:
      issue navigation
      See Also:
    • comment

      public CommentNavigation comment()
      Description copied from interface: Navigation
      Access API to navigate through comments.
      Specified by:
      comment in interface Navigation
      Returns:
      comment navigation
      See Also:
    • gotoFullContentView

      public void gotoFullContentView(String jql)
      Specified by:
      gotoFullContentView in interface Navigation
    • gotoXmlView

      public void gotoXmlView(String jql)
      Specified by:
      gotoXmlView in interface Navigation
    • issueNavigator

      public IssueNavigatorNavigation issueNavigator()
      Description copied from interface: Navigation
      Access API to navigate through issue navigator.
      Specified by:
      issueNavigator in interface Navigation
      Returns:
      issue navigator navigation
      See Also:
    • filterPickerPopup

      public FilterNavigation filterPickerPopup()
      Specified by:
      filterPickerPopup in interface Navigation
    • userProfile

      public UserProfile userProfile()
      Specified by:
      userProfile in interface Navigation
    • dashboard

      public Dashboard dashboard()
      Description copied from interface: Navigation
      Navigates to the dashboard, returning it.
      Specified by:
      dashboard in interface Navigation
      Returns:
      the Dashboard.
    • workflows

      public Workflows workflows()
      Specified by:
      workflows in interface Navigation
    • clickOnNext

      public void clickOnNext()
      Description copied from interface: Navigation
      Clicks on the 'Next' button (useful for bulk edits and such)
      Specified by:
      clickOnNext in interface Navigation