Interface Navigation
- All Known Implementing Classes:
NavigationImpl
public interface Navigation
An interface for navigating around JIRA
- Since:
- v3.13
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<T extends WebTestPage>
Tvoid
browseComponentTabPanel
(String projectKey, String componentName) Navigates to Browse Component page of the specified componentvoid
browseComponentTabPanel
(String projectKey, String componentName, String tab) Navigates to the component tab panel for the specified component.void
browseProject
(String projectKey) Navigates to the project's Browse pagevoid
browseProjectTabPanel
(String projectKey, String tab) Navigates to the project tab panel for the specified project.void
browseVersionTabPanel
(String projectKey, String versionName) Navigates to Browse Version page of the specified componentvoid
browseVersionTabPanel
(String projectKey, String versionName, String tab) Navigates to the component tab panel for the specified component.void
clickLink
(com.meterware.httpunit.WebLink webLink) Follows the URL in the given WebLink.void
clickLinkInTableCell
(com.meterware.httpunit.WebTable table, int row, int col, String linkText) Click on a link in a particular table cell with the given text.void
clickLinkInTableCell
(String tableId, int row, int col, String linkText) Click on a link in a particular table cell with the given text.void
clickLinkWithExactText
(String text) Finds the first link on the page with the exact text and follows the URL.void
clickLinkWithPost
(com.meterware.httpunit.WebLink webLink) Follows the URL in the given WebLink using PostMethodWebRequest with body containing XSRF token only.void
clickLinkWithPost
(com.meterware.httpunit.WebLink webLink, InputStream bodyInputStream) Follows the URL in the given WebLink using PostMethodWebRequest with body defined by bodyInputStream.void
Clicks on the 'Next' button (useful for bulk edits and such)comment()
Access API to navigate through comments.Navigates to the dashboard, returning it.void
Historically this connected to a REST endpoint in the jira-functest-plugin to disable WebSudo Currently this does nothingReturns the relative path of the current page.void
Navigates to the admin sectionvoid
gotoAdminSection
(Navigation.AdminSection section) Navigates to a particular AdminSection.void
Navigates to the 'Custom Fields' page in the administration sectionvoid
Goto the current user's dashboard.void
<T extends WebTestPage>
Tvoid
Navigates to the given relative URL.<T extends WebTestPage>
TgotoPageWithParams
(Class<T> pageClass, String params) void
gotoResource
(String resourcePath) Navigates to the relative resource path.void
Navigates to the workflows table in the admin sectionvoid
gotoXmlView
(String jql) issue()
Access API to navigate through issues.Access API to navigate through issue navigator.void
Writes the specified message to the atlassian-jira.log on the server side.void
This assumes the standard JIRA test behaviour of having the user name the same value as the passwordvoid
Login the given user.void
void
loginAttempt
(String userName, String userPassword) Attempts to login the given user without asserting success.void
loginUsingForm
(String userName, String userPassword) void
loginUsingForm
(String userName, String userPassword, boolean useCookie, boolean assertSuccess) Login by navigating to the Dashboard and filling out the login form and submitting itvoid
loginUsingURLParameters
(String userName, String userPassword, boolean useCookie) Login by adding parameters to the Dashboard URLvoid
logout()
Logout current user.Go to the 'Manage filters' screen.void
Run the given report for the given projectvoid
Run the given report for the given project using the given mappervoid
sendPostRequest
(String url, InputStream bodyInputStream) Visits the site with POST method.void
webSudoAuthenticate
(String password) Checks if we have been redirected to the websudo login form and logs in.void
Checks if we have been redirected to the websudo login form and logs in using the last password
-
Method Details
-
login
This assumes the standard JIRA test behaviour of having the user name the same value as the password- Parameters:
userName
- the user name and password to login as
-
login
Login the given user. Note that this will assert that the login suceeded.- Parameters:
userName
- the user name and password to login as- See Also:
-
login
-
loginUsingURLParameters
Login by adding parameters to the Dashboard URL e.g. http://localhost:8090/jira/secure/Dashboard.jspa?os_username=admin&os_password=admin- Parameters:
userName
-userPassword
-useCookie
-
-
loginUsingForm
Login by navigating to the Dashboard and filling out the login form and submitting it- Parameters:
userName
-userPassword
-useCookie
-assertSuccess
-
-
loginUsingForm
-
loginAttempt
Attempts to login the given user without asserting success.- Parameters:
userName
-userPassword
-
-
logout
void logout()Logout current user. -
getCurrentPage
String getCurrentPage()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 withWebTester.gotoPage(java.lang.String)
.- Returns:
- the relative path of the current page.
-
clickLink
void clickLink(com.meterware.httpunit.WebLink webLink) Follows the URL in the given WebLink.- Parameters:
webLink
- WebLink
-
clickLinkWithPost
Follows the URL in the given WebLink using PostMethodWebRequest with body defined by bodyInputStream.- Parameters:
webLink
- WebLinkbodyInputStream
- POST request body
-
clickLinkWithPost
void clickLinkWithPost(com.meterware.httpunit.WebLink webLink) Follows the URL in the given WebLink using PostMethodWebRequest with body containing XSRF token only.- Parameters:
webLink
- WebLink
-
sendPostRequest
Visits the site with POST method.- Parameters:
url
- relative url to visitbodyInputStream
- input stream sent as request body
-
clickLinkWithExactText
Finds the first link on the page with the exact text and follows the URL. Note: This is not the same asWebTester.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.- Parameters:
text
- the text of the link to match
-
clickLinkInTableCell
Click on a link in a particular table cell with the given text.- Parameters:
tableId
- The id of the table whose link we're clickingrow
- The table row that contains the linkcol
- The table column that contains the linklinkText
- The text of the link
-
clickLinkInTableCell
Click on a link in a particular table cell with the given text.- Parameters:
table
- The table whose link we're clickingrow
- The table row that contains the linkcol
- The table column that contains the linklinkText
- The text of the link
-
jiraLog
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.- Parameters:
logMessage
- the message to log
-
gotoPage
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.- Parameters:
url
- URL to navigate to.
-
bindPage
-
gotoPage
-
gotoPageWithParams
-
gotoResource
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".- Parameters:
resourcePath
- path to navigate to.
-
gotoDashboard
void gotoDashboard()Goto the current user's dashboard. This is a quick way to calldashboard().navigateTo()
. -
gotoAdmin
void gotoAdmin()Navigates to the admin section -
webSudoAuthenticate
Checks if we have been redirected to the websudo login form and logs in.- Parameters:
password
-
-
webSudoAuthenticateUsingLastPassword
void webSudoAuthenticateUsingLastPassword()Checks if we have been redirected to the websudo login form and logs in using the last password -
disableWebSudo
void disableWebSudo()Historically this connected to a REST endpoint in the jira-functest-plugin to disable WebSudo Currently this does nothing -
gotoCustomFields
void gotoCustomFields()Navigates to the 'Custom Fields' page in the administration section -
gotoWorkflows
void gotoWorkflows()Navigates to the workflows table in the admin section -
runReport
Run the given report for the given project- Parameters:
projectId
- The id of the projectreportKey
- The key of the report.
-
runReport
Run the given report for the given project using the given mapper- Parameters:
projectId
- The id of the projectreportKey
- The key of the reportfilterId
- The filter id used for the reportmapper
- The mapper used for the report (e.g. "labels")
-
browseProject
Navigates to the project's Browse page- Parameters:
projectKey
- the key of the project e.g. "HSP"
-
browseProjectTabPanel
Navigates to the project tab panel for the specified project.- 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
Navigates to the component tab panel for the specified component.- 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
Navigates to the component tab panel for the specified component.- 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
Navigates to Browse Component page of the specified component- Parameters:
projectKey
- the key of the project e.g. "HSP"componentName
- the name of the component e.g. "New Component 1"
-
browseVersionTabPanel
Navigates to Browse Version page of the specified component- Parameters:
projectKey
- the key of the project e.g. "HSP"versionName
- the name of the version e.g. "New Version 1"
-
manageFilters
FilterNavigation manageFilters()Go to the 'Manage filters' screen. Access API to navigate through issue filters.- Returns:
- filter navigation
-
issue
IssueNavigation issue()Access API to navigate through issues.- Returns:
- issue navigation
- See Also:
-
comment
CommentNavigation comment()Access API to navigate through comments.- Returns:
- comment navigation
- See Also:
-
gotoFullContentView
-
gotoXmlView
-
filterPickerPopup
FilterNavigation filterPickerPopup() -
userProfile
UserProfile userProfile() -
dashboard
Dashboard dashboard()Navigates to the dashboard, returning it.- Returns:
- the Dashboard.
-
workflows
Workflows workflows() -
clickOnNext
void clickOnNext()Clicks on the 'Next' button (useful for bulk edits and such)
-