Class ConfluenceNavigation
java.lang.Object
com.atlassian.jira.webtests.ztests.applinks.confluence.ConfluenceNavigation
- All Implemented Interfaces:
Navigation
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.functest.framework.Navigation
Navigation.AdminSection -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends WebTestPage>
TvoidbrowseComponentTabPanel(String projectKey, String componentName) Navigates to Browse Component page of the specified componentvoidbrowseComponentTabPanel(String projectKey, String componentName, String tab) Navigates to the component tab panel for the specified component.voidbrowseProject(String projectKey) Navigates to the project's Browse pagevoidbrowseProjectTabPanel(String projectKey, String tab) Navigates to the project tab panel for the specified project.voidbrowseVersionTabPanel(String projectKey, String versionName) Navigates to Browse Version page of the specified componentvoidbrowseVersionTabPanel(String projectKey, String versionName, String tab) Navigates to the component tab panel for the specified component.voidclickLink(com.meterware.httpunit.WebLink webLink) Follows the URL in the given WebLink.voidclickLinkInTableCell(com.meterware.httpunit.WebTable table, int row, int col, String linkText) Click on a link in a particular table cell with the given text.voidclickLinkInTableCell(String tableId, int row, int col, String linkText) Click on a link in a particular table cell with the given text.voidclickLinkWithExactText(String text) Finds the first link on the page with the exact text and follows the URL.voidclickLinkWithPost(com.meterware.httpunit.WebLink webLink) Follows the URL in the given WebLink using PostMethodWebRequest with body containing XSRF token only.voidclickLinkWithPost(com.meterware.httpunit.WebLink webLink, InputStream bodyInputStream) Follows the URL in the given WebLink using PostMethodWebRequest with body defined by bodyInputStream.voidClicks on the 'Next' button (useful for bulk edits and such)comment()Access API to navigate through comments.Navigates to the dashboard, returning it.voidHistorically this connected to a REST endpoint in the jira-functest-plugin to disable WebSudo Currently this does nothingvoidReturns the relative path of the current page.voidNavigates to the admin sectionvoidgotoAdminSection(Navigation.AdminSection section) Navigates to a particular AdminSection.voidNavigates to the 'Custom Fields' page in the administration sectionvoidGoto the current user's dashboard.void<T extends WebTestPage>
TvoidNavigates to the given relative URL.<T extends WebTestPage>
TgotoPageWithParams(Class<T> pageClass, String params) voidgotoResource(String resourcePath) Navigates to the relative resource path.voidNavigates to the workflows table in the admin sectionvoidgotoXmlView(String jql) issue()Access API to navigate through issues.Access API to navigate through issue navigator.voidWrites the specified message to the atlassian-jira.log on the server side.voidThis assumes the standard JIRA test behaviour of having the user name the same value as the passwordvoidLogin the given user.voidvoidloginAttempt(String userName, String userPassword) Attempts to login the given user without asserting success.voidloginUsingForm(String userName, String userPassword) voidloginUsingForm(String userName, String userPassword, boolean useCookie, boolean assertSuccess) Login by navigating to the Dashboard and filling out the login form and submitting itvoidloginUsingURLParameters(String userName, String userPassword, boolean useCookie) Login by adding parameters to the Dashboard URLvoidlogout()Logout current user.Go to the 'Manage filters' screen.voidRun the given report for the given projectvoidRun the given report for the given project using the given mappervoidsendPostRequest(String url, InputStream bodyInputStream) Visits the site with POST method.voidwebSudoAuthenticate(String password) Checks if we have been redirected to the websudo login form and logs in.voidChecks if we have been redirected to the websudo login form and logs in using the last password
-
Constructor Details
-
ConfluenceNavigation
public ConfluenceNavigation(net.sourceforge.jwebunit.WebTester tester)
-
-
Method Details
-
login
Description copied from interface:NavigationThis assumes the standard JIRA test behaviour of having the user name the same value as the password- Specified by:
loginin interfaceNavigation- Parameters:
userName- the user name and password to login as
-
login
Description copied from interface:NavigationLogin the given user. Note that this will assert that the login suceeded.- Specified by:
loginin interfaceNavigation- Parameters:
userName- the user name and password to login as- See Also:
-
loginAttempt
Description copied from interface:NavigationAttempts to login the given user without asserting success.- Specified by:
loginAttemptin interfaceNavigation- Parameters:
userName-userPassword-
-
login
- Specified by:
loginin interfaceNavigation
-
doLogin
-
loginUsingForm
- Specified by:
loginUsingFormin interfaceNavigation
-
loginUsingForm
public void loginUsingForm(String userName, String userPassword, boolean useCookie, boolean assertSuccess) Description copied from interface:NavigationLogin by navigating to the Dashboard and filling out the login form and submitting it- Specified by:
loginUsingFormin interfaceNavigation- Parameters:
userName-userPassword-useCookie-assertSuccess-
-
loginUsingURLParameters
Description copied from interface:NavigationLogin 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:
loginUsingURLParametersin interfaceNavigation- Parameters:
userName-userPassword-useCookie-
-
logout
public void logout()Description copied from interface:NavigationLogout current user.- Specified by:
logoutin interfaceNavigation
-
getCurrentPage
Description copied from interface:NavigationReturns 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).- Specified by:
getCurrentPagein interfaceNavigation- Returns:
- the relative path of the current page.
-
clickLink
public void clickLink(com.meterware.httpunit.WebLink webLink) Description copied from interface:NavigationFollows the URL in the given WebLink.- Specified by:
clickLinkin interfaceNavigation- Parameters:
webLink- WebLink
-
clickLinkWithPost
Description copied from interface:NavigationFollows the URL in the given WebLink using PostMethodWebRequest with body defined by bodyInputStream.- Specified by:
clickLinkWithPostin interfaceNavigation- Parameters:
webLink- WebLinkbodyInputStream- POST request body
-
clickLinkWithPost
public void clickLinkWithPost(com.meterware.httpunit.WebLink webLink) Description copied from interface:NavigationFollows the URL in the given WebLink using PostMethodWebRequest with body containing XSRF token only.- Specified by:
clickLinkWithPostin interfaceNavigation- Parameters:
webLink- WebLink
-
sendPostRequest
Description copied from interface:NavigationVisits the site with POST method.- Specified by:
sendPostRequestin interfaceNavigation- Parameters:
url- relative url to visitbodyInputStream- input stream sent as request body
-
clickLinkWithExactText
Description copied from interface:NavigationFinds 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.- Specified by:
clickLinkWithExactTextin interfaceNavigation- Parameters:
text- the text of the link to match
-
clickLinkInTableCell
Description copied from interface:NavigationClick on a link in a particular table cell with the given text.- Specified by:
clickLinkInTableCellin interfaceNavigation- 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
public void clickLinkInTableCell(com.meterware.httpunit.WebTable table, int row, int col, String linkText) Description copied from interface:NavigationClick on a link in a particular table cell with the given text.- Specified by:
clickLinkInTableCellin interfaceNavigation- 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
Description copied from interface:NavigationWrites 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:
jiraLogin interfaceNavigation- Parameters:
logMessage- the message to log
-
gotoPage
Description copied from interface:NavigationNavigates 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:
gotoPagein interfaceNavigation- Parameters:
url- URL to navigate to.
-
bindPage
- Specified by:
bindPagein interfaceNavigation
-
gotoPage
- Specified by:
gotoPagein interfaceNavigation
-
gotoPageWithParams
- Specified by:
gotoPageWithParamsin interfaceNavigation
-
gotoResource
Description copied from interface:NavigationNavigates 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:
gotoResourcein interfaceNavigation- Parameters:
resourcePath- path to navigate to.
-
gotoDashboard
public void gotoDashboard()Description copied from interface:NavigationGoto the current user's dashboard. This is a quick way to calldashboard().navigateTo().- Specified by:
gotoDashboardin interfaceNavigation
-
gotoAdmin
public void gotoAdmin()Description copied from interface:NavigationNavigates to the admin section- Specified by:
gotoAdminin interfaceNavigation
-
webSudoAuthenticate
Description copied from interface:NavigationChecks if we have been redirected to the websudo login form and logs in.- Specified by:
webSudoAuthenticatein interfaceNavigation- Parameters:
password-
-
webSudoAuthenticateUsingLastPassword
public void webSudoAuthenticateUsingLastPassword()Description copied from interface:NavigationChecks if we have been redirected to the websudo login form and logs in using the last password- Specified by:
webSudoAuthenticateUsingLastPasswordin interfaceNavigation
-
disableWebSudo
public void disableWebSudo()Description copied from interface:NavigationHistorically this connected to a REST endpoint in the jira-functest-plugin to disable WebSudo Currently this does nothing- Specified by:
disableWebSudoin interfaceNavigation
-
gotoCustomFields
public void gotoCustomFields()Description copied from interface:NavigationNavigates to the 'Custom Fields' page in the administration section- Specified by:
gotoCustomFieldsin interfaceNavigation
-
gotoWorkflows
public void gotoWorkflows()Description copied from interface:NavigationNavigates to the workflows table in the admin section- Specified by:
gotoWorkflowsin interfaceNavigation
-
runReport
Description copied from interface:NavigationRun the given report for the given project- Specified by:
runReportin interfaceNavigation- Parameters:
projectId- The id of the projectreportKey- The key of the report.
-
runReport
Description copied from interface:NavigationRun the given report for the given project using the given mapper- Specified by:
runReportin interfaceNavigation- 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
Description copied from interface:NavigationNavigates to the project's Browse page- Specified by:
browseProjectin interfaceNavigation- Parameters:
projectKey- the key of the project e.g. "HSP"
-
browseProjectTabPanel
Description copied from interface:NavigationNavigates to the project tab panel for the specified project.- Specified by:
browseProjectTabPanelin interfaceNavigation- 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
Description copied from interface:NavigationNavigates to the component tab panel for the specified component.- Specified by:
browseComponentTabPanelin interfaceNavigation- 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
Description copied from interface:NavigationNavigates to the component tab panel for the specified component.- Specified by:
browseVersionTabPanelin interfaceNavigation- 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
Description copied from interface:NavigationNavigates to Browse Component page of the specified component- Specified by:
browseComponentTabPanelin interfaceNavigation- Parameters:
projectKey- the key of the project e.g. "HSP"componentName- the name of the component e.g. "New Component 1"
-
browseVersionTabPanel
Description copied from interface:NavigationNavigates to Browse Version page of the specified component- Specified by:
browseVersionTabPanelin interfaceNavigation- Parameters:
projectKey- the key of the project e.g. "HSP"versionName- the name of the version e.g. "New Version 1"
-
manageFilters
Description copied from interface:NavigationGo to the 'Manage filters' screen. Access API to navigate through issue filters.- Specified by:
manageFiltersin interfaceNavigation- Returns:
- filter navigation
-
issue
Description copied from interface:NavigationAccess API to navigate through issues.- Specified by:
issuein interfaceNavigation- Returns:
- issue navigation
- See Also:
-
comment
Description copied from interface:NavigationAccess API to navigate through comments.- Specified by:
commentin interfaceNavigation- Returns:
- comment navigation
- See Also:
-
gotoFullContentView
- Specified by:
gotoFullContentViewin interfaceNavigation
-
gotoXmlView
- Specified by:
gotoXmlViewin interfaceNavigation
-
filterPickerPopup
- Specified by:
filterPickerPopupin interfaceNavigation
-
userProfile
- Specified by:
userProfilein interfaceNavigation
-
dashboard
Description copied from interface:NavigationNavigates to the dashboard, returning it.- Specified by:
dashboardin interfaceNavigation- Returns:
- the Dashboard.
-
workflows
- Specified by:
workflowsin interfaceNavigation
-
clickOnNext
public void clickOnNext()Description copied from interface:NavigationClicks on the 'Next' button (useful for bulk edits and such)- Specified by:
clickOnNextin interfaceNavigation
-