com.atlassian.confluence.cluster
Class Node

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sourceforge.jwebunit.junit.WebTestCase
              extended by com.atlassian.confluence.AbstractAtlassianWebTestCase
                  extended by com.atlassian.confluence.AbstractConfluenceAcceptanceTest
                      extended by com.atlassian.confluence.cluster.Node
All Implemented Interfaces:
junit.framework.Test

public class Node
extends AbstractConfluenceAcceptanceTest

Clustered tests instantiate an instance of this class for each cluster node to allow access to the standard test methods against that node.


Field Summary
 
Fields inherited from class com.atlassian.confluence.AbstractConfluenceAcceptanceTest
adminToken, ANONYMOUS_USER, BLOG_DATE_FORMAT, BROWSE_MENU_LINK_ID, context, filesToDelete, funcTestRpcPlugin, LDAP_MODE, log, PAUSE_MILLIS, PAUSE_MYSQL_MILLIS, pluginHelper, RANDOM, RPCLOG_DEBUG, RPCLOG_ERROR, RPCLOG_INFO, RPCLOG_SYSTEM_ERR, RPCLOG_SYSTEM_OUT, RPCLOG_WARN, TEST_ADMIN, TEST_ADMIN_EMAIL, TEST_ADMIN_FULLNAME, TEST_ADMIN_PASSWORD, TEST_ADMIN_USERNAME, TEST_GEN_EMAIL1, TEST_GEN_EMAIL2, TEST_GEN_FULLNAME1, TEST_GEN_FULLNAME2, TEST_GEN_PASSWORD1, TEST_GEN_PASSWORD2, TEST_GEN_USERNAME1, TEST_GEN_USERNAME2, TEST_GROUP1, TEST_USER1, TEST_USER2, TESTMAILSERVER_HOSTNAME, TESTPAGE_COMMENT, TESTPAGE_CONTENT, TESTPAGE_TITLE, TESTSPACE_DESCRIPTION, TESTSPACE_KEY, TESTSPACE_TITLE, TESTSPACE2_DESCRIPTION, TESTSPACE2_KEY, TESTSPACE2_TITLE, testUser2Token, testUserToken, userHelper, VIEW_PERSONAL_SPACE_LINK, xmlrpc
 
Fields inherited from class com.atlassian.confluence.AbstractAtlassianWebTestCase
SITE_TITLE_SUFFIX, TITLE_SEPARATOR
 
Fields inherited from class net.sourceforge.jwebunit.junit.WebTestCase
tester
 
Constructor Summary
Node(java.lang.String name, java.lang.String nodeBaseUrl)
           
 
Method Summary
 void addComment(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String comment)
           
 void addCommentToBlogPost(java.lang.String spaceKey, java.lang.String newsTitle, java.lang.String comment)
           
 void addSpaceLabel(java.lang.String labelName)
           
 void addUserProfilePicture(java.lang.String fileName)
          Adds the given File as the user's profile picture
 void addUserToGroupViaHelper(java.lang.String token, java.lang.String username, java.lang.String groupname)
          Adds the given user to a groupname
 ViewContentBean addWatchPage()
           
 void assertCollectionContainsKeyWithValue(java.util.Collection collection, java.lang.String key, java.lang.String value)
           
 void assertLinkWithTextExists(java.lang.String linkText)
           
 void assertSelectBoxContainsOption(java.lang.String selectName, java.lang.String optionName)
           
 void assertTitleEquals(java.lang.String pageTitle, java.lang.String spaceTitle)
          Asserts that the title equals the passed pageTitle plus separator plus spaceTitle plus site suffix (usually SITE_TITLE_SUFFIX).
 void attachFile(java.io.File attachment, java.lang.String comment)
          Click the attach file link, attach a given file with a given comment and submit the attachment form.
 void checkCheckbox(java.lang.String checkBoxName)
           
 void checkCheckbox(java.lang.String checkBoxName, java.lang.String value)
           
 void clickAnyButtonWithValue(java.lang.String value)
           
 void clickButton(java.lang.String string)
           
 void clickButtonWithValue(java.lang.String value)
           
 void clickLink(java.lang.String string)
           
 void clickLinkWithImage(java.lang.String string)
           
 void clickLinkWithText(java.lang.String string)
           
 void clickLinkWithText(java.lang.String string, int i)
           
 void clickSubmitButtonWithValue(java.lang.String value)
           
 void createBlog(java.lang.String spaceName, java.lang.String title, java.lang.String body)
           
 void createGroup(java.lang.String group)
          Create a group via the Web Interface.
 void createGroupViaHelper(java.lang.String token, java.lang.String groupName)
          Creates a group with the given name
 void createMail(java.io.File mail, java.lang.String spaceKey)
           
 ViewContentBean createPage(java.lang.String spaceName, java.lang.String title, java.lang.String body, java.lang.String parentPageTitle)
           
 void createPersonalSpace(java.lang.String fullname)
           
 void createSpaceViaWebUi(Space space)
           
 void createSpaceViaWebUI(java.lang.String key, java.lang.String name, java.lang.String description)
           
 void createTemplate(java.lang.String spaceName, java.lang.String templateTitle, java.lang.String templateDescription, java.lang.String templateContent)
           
 void createTestSpaceViaWebUI()
          For those times we need to ensure a space was created via the web UI (For example if the web UI may behave differently to RPC)
 void createTestUser1ViaHelper(java.lang.String token)
          Creates the test user via the XML-RPC interface
 void createTestUser2ViaHelper(java.lang.String token)
          Creates the 2nd test user via the XML-RPC interface
 void createUserViaHelper(java.lang.String token, java.lang.String username, java.lang.String password, java.lang.String fullName, java.lang.String email)
          Creates a new user with the given details via the XML-RPC interface
 void disableAnonymousAccess()
           
 void disableAnonymousRemoteApi()
           
 void disablePublicSignup()
           
 void disableRemoteApi()
           
 void disableThreadedComments()
           
 void dumpTable(java.lang.String tableNameOrId, java.io.PrintStream stream)
           
 void editPage(java.lang.String spaceKey, java.lang.String pageTitle)
           
 void editPageWithContent(java.lang.String spaceKey, java.lang.String title, java.lang.String newContent)
           
 void editProfile(java.lang.String info)
           
 void editSpacePermsForm()
           
 void emptyTrash()
           
 void enableAnonymousAccess()
           
 void enableAnonymousAccessToSpace(java.lang.String spaceKey)
           
 void ensureTestUserCanViewTestSpace()
           
 void ensureUserCanViewSpace(java.lang.String user, java.lang.String spaceTitle)
           
protected  java.lang.String generateBaseUrl()
           
 java.io.File generateFile(java.lang.String filename, java.lang.String contents)
           
 java.lang.String getAppContext()
           
 int getCurrentMailQueueSize()
           
 java.lang.String getGroupFromResponse(java.lang.String pattern)
           
 long getPageId(java.lang.String spaceKey, java.lang.String title)
           
 Space getTestSpace()
           
 java.lang.String getTodaysBlogPostDate()
           
 org.apache.xmlrpc.XmlRpcClient getXmlRpcClient()
           
 void goToEditGeneralConfiguration()
           
 void grantAnonymousUseConfluencePermission()
           
 void grantGlobalBrowsePermissionToGroup(java.lang.String groupName)
           
 void grantGlobalPermissionToGroup(java.lang.String permissionType, java.lang.String groupName)
           
 void grantGlobalPermissionToUser(java.lang.String permissionType, java.lang.String userName)
           
 void grantSpacePermissionToGroup(java.lang.String spaceKey, java.lang.String permissionType, java.lang.String groupName)
          Grant view space permissions and one other space permission to a specified group.
 void grantSpacePermissionToUser(java.lang.String spaceKey, java.lang.String permissionType, java.lang.String userName)
          Grant view space permissions and one other space permission to a specified user.
 void grantViewSpacePermissionToGroup(java.lang.String spaceKey, java.lang.String groupName)
           
 void grantViewSpacePermissionToUser(java.lang.String spaceKey, java.lang.String username)
           
 void logInAs(java.lang.String username, java.lang.String password)
           
 void logInAs(java.lang.String username, java.lang.String password, boolean fastMode)
           
 void logInAsAdmin()
           
 void loginAsTestUser()
           
 void logout()
           
 void movePage(java.lang.String spaceKey, java.lang.String title, java.lang.String newSpaceName, java.lang.String newParentPage)
           
 void movePageToNewParent(java.lang.String spaceKey, java.lang.String title, java.lang.String newParentPage)
           
 void openInsertLinkPopup()
          Clicks the "Insert Link" button, if it exists, on the current page (expected to be the "Add" or "Edit" page)

Focus will then be moved to the popup window

 void pause(long milliseconds)
          We use pause because mysql is not very good at distinguishing times that are close together.
 void removeBlog(java.lang.String spaceKey, java.lang.String postDateString, java.lang.String postTitle)
           
 void removeGroup(java.lang.String groupName)
          Delete a group via the Web Interface.
 void removePersonalSpace(java.lang.String username)
           
 void removeTestUser1()
          Remove testUser1 via the Web Interface.
 void removeTestUser1ViaHelper(java.lang.String token)
          Removes the test user
 void removeUser(java.lang.String username)
          Remove a user via the Web Interface.
 void removeUserFromGroupViaHelper(java.lang.String token, java.lang.String username, java.lang.String groupname)
          Removes the given user from the group
 void removeUserViaHelper(java.lang.String token, java.lang.String username)
          Removes a user with the given username
 void renamePage(java.lang.String spaceKey, java.lang.String originalPageTitle, java.lang.String newPageTitle)
           
 void revokeAnonymousUseConfluencePermission()
           
 void revokeGlobalPermissionFromGroup(java.lang.String permissionType, java.lang.String groupName)
          Removes the specified global permission (from SpacePermission) from the given group name
 java.util.Hashtable rpcAddComment(java.lang.String token, long pageId, java.lang.String comment)
          Adds a comment to a page via the XML-RPC interface
 java.util.Hashtable rpcAddComment(java.lang.String token, java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String comment)
          Adds a comment to a page via the XML-RPC interface
 void rpcAddLabelToBlog(java.lang.String token, java.lang.String label, long blogId)
          Adds a label to the blogpost with the given page ID
 void rpcAddLabelToPage(java.lang.String token, java.lang.String label, long pageId)
          Adds a label to the Page with the given page ID
 void rpcAddLabelToPage(java.lang.String token, java.lang.String label, java.lang.String spaceKey, java.lang.String pageTitle)
          Adds a label to the Page with the given details

This method retrieves the ID for the given Page and passes it onto the appropriate rpcAddLabelToPage method

 void rpcAddLabelToSpace(java.lang.String token, java.lang.String label, java.lang.String spaceKey)
          Adds a label to a space
 void rpcConvertToPersonalSpace(java.lang.String token, java.lang.String userName, java.lang.String spaceKey, java.lang.String newName, boolean updateLinks)
           
 long rpcCreateBlogPost(java.lang.String token, java.lang.String spaceKey, java.lang.String postTitle, java.lang.String postContent)
          Creates a new blog entry via the XML-RPC interface
 long rpcCreatePage(java.lang.String token, java.lang.String spaceKey, java.lang.String title, java.lang.String content)
          Creates a page via the XML-RPC interface
 long rpcCreatePage(java.lang.String token, java.lang.String spaceKey, java.lang.String title, java.lang.String content, long parentPageId)
          Creates a page via the XML-RPC interface
 java.util.Hashtable rpcCreatePersonalSpace(java.lang.String token, java.lang.String name, java.lang.String description, java.lang.String username)
          Creates a personal space via the XML-RPC interface
 java.util.Hashtable rpcCreateSpace(java.lang.String token, java.lang.String key, java.lang.String name, java.lang.String description)
           
 long rpcCreateTestPage(java.lang.String token)
          Creates the test page in the test space via the XML-RPC interface
 java.util.Hashtable rpcCreateTestSpace(java.lang.String token)
          Creates the test space via the XML-RPC interface

This method first checks if the test space exists, and logs a message if it does

 java.util.Hashtable rpcCreateTestSpace2(java.lang.String token)
          Creates the 2nd test space via the XML-RPC interface

This method first checks if the test space exists, and logs a message if it does

 void rpcEditBlogPost(java.lang.String token, long entryId, java.lang.String newTitle, java.lang.String newContent)
          Modifies the page with the given details via the XML-RPC interface
 void rpcEditPage(java.lang.String token, java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String newTitle, java.lang.String newContent)
          Modifies the page with the given details via the XML-RPC interface
 void rpcFlushIndexQueue()
           
 java.lang.String rpcGetAdminToken()
          Retrieves a token for the admin user
 long rpcGetBlogPostId(java.lang.String token, java.lang.String spaceKey, int dayOfMonth, java.lang.String postTitle)
          Retrieves the ID of a blog post with the given details
 long rpcGetPageId(java.lang.String token, java.lang.String spaceKey, java.lang.String pageTitle)
          Retrieves the page ID for a page with the given details
 java.util.List rpcGetPageLabels(java.lang.String token, long pageId)
          Retrieves the labels assigned to a Page with the given page ID
 java.util.List rpcGetPageLabels(java.lang.String token, java.lang.String spaceKey, java.lang.String pageTitle)
          Retrieves the labels assigned to a page with the given details

This method retrieves the page ID and passes it onto the appropriate rpcGetPageLabels method

 java.lang.String rpcGetTestUser2Token()
          Retrieves a token for the test user 2
 java.lang.String rpcGetTestUserToken()
          Retrieves a token for the test user
 java.lang.String rpcGetUserToken(java.lang.String username, java.lang.String password)
          Retrieves the user token for the given details, for use with the XML-RPC interface
 void rpcGrantAnonymousSpacePermission(java.lang.String token, java.lang.String permission, java.lang.String spaceKey)
          Grants the given permission to the anonymous user for the given space
 void rpcGrantSpacePermission(java.lang.String token, java.lang.String permission, java.lang.String username, java.lang.String spaceKey)
          Grants the given permission to a user for a particular Space
 void rpcGrantViewSpacePermission(java.lang.String token, java.lang.String entityName, java.lang.String spaceKey)
          Convenience method for granting VIEWSPACE permission to a particular user
 boolean rpcLog(java.lang.String destination, java.lang.String message)
           
 void rpcLogOutAdmin()
           
 void rpcRemoveAnonymousSpacePermission(java.lang.String token, java.lang.String permission, java.lang.String spaceKey)
          Removes the given permission for the anonymous user from the given space
 void rpcRemoveGroup(java.lang.String token, java.lang.String groupname)
          Removes the given group
 void rpcRemoveLabelFromPage(java.lang.String token, java.lang.String label, long pageId)
          Removes the given label from the page with the given page ID
 void rpcRemoveLabelFromPage(java.lang.String token, java.lang.String label, java.lang.String spaceKey, java.lang.String pageTitle)
           
 void rpcRemoveLabelFromSpace(java.lang.String token, java.lang.String label, java.lang.String spaceKey)
          Removes a label from a space
 void rpcRemovePage(java.lang.String token, java.lang.String spaceKey, long pageId)
           
 void rpcRemoveSpace(java.lang.String token, java.lang.String spaceKey)
          Remove a space with the given key via the XML-RPC interface
 void rpcRemoveSpacePermission(java.lang.String token, java.lang.String permission, java.lang.String username, java.lang.String spaceKey)
          Removes the given permission for a user for a particular Space
 void rpcTrashPage(java.lang.String token, long pageId)
          Trashes (removes) a page with the given ID

This method converts the long into a String and calls the appropriate rpcTrashPage method

 void rpcTrashPage(java.lang.String token, java.lang.String pageId)
          Trashes (removes) a page with the given ID
 void rpcTrashPage(java.lang.String token, java.lang.String spaceKey, java.lang.String pageTitle)
          Trashes (removes) a page with the given details

This method retrieves the page with the given details and calls the appropriate rpcTrashPage method

 void search(java.lang.String query)
           
 void setAnonymousRemoteApi(boolean enabled)
           
 void setAttachmentMaxUploadSize(long max)
           
 void setDraftSaveInterval(long seconds)
           
 void setEmailMask(java.lang.String setting)
           
 void setFormElement(java.lang.String formElementName, java.lang.String value)
           
 void setNotifyOnMyActions(boolean notify)
           
 void setPageLabels(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String label)
          Add the specified label to the page via the pages edit view.
 void setPublicSignup(boolean enabled)
           
 void setRemoteApi(boolean enabled)
           
 void setThreadedComments(boolean enable)
           
 void setViewPermissionsForGroups(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String group)
          Edit the permissions of the specified page as the current user.
 void setViewPermissionsForUsers(java.lang.String spaceKey, java.lang.String pageTitle, java.lang.String user)
          Edit the permissions of the specified page as the current user.
 void showAllUsers()
           
 void submit()
           
 void tearDown()
          Default tearDown method.
 void uncheckCheckbox(java.lang.String checkBoxName)
           
 void uncheckCheckbox(java.lang.String checkBoxName, java.lang.String value)
           
 void viewAbstractPage(long entityId)
          Views the page for a Page or BlogPost (AbstractPage)
 void viewBlog(java.lang.String spaceKey, java.lang.String datePath, java.lang.String title)
           
 void viewEditBlogPostPage(long entryId)
          Views the edit blog post page for the post with the given ID
 void viewGlobalAdmin()
           
 void viewGlobalPermissions()
           
 void viewHomepage()
           
 void viewLabel(java.lang.String spaceKey, java.lang.String labelName)
           
 ViewContentBean viewPage(java.lang.String spaceKey, java.lang.String pageTitle)
           
 void viewSpaceAdmin()
           
 void viewSpaceAdvanced()
           
 void viewSpaceContent()
           
 void viewSpacePermissions(java.lang.String spaceKey)
           
 void viewSpaceSummary()
           
 void viewTodaysBlog(java.lang.String spaceKey, java.lang.String title)
           
 void viewTrash()
           
 void viewUser(java.lang.String name)
           
 
Methods inherited from class com.atlassian.confluence.AbstractConfluenceAcceptanceTest
addAnonymousPermissionsToSpace, addPageComment, assertImageValid, assertLoggedInAs, attachFileWithName, chooseRandomBaseUrl, clickRemoveLink, createPageWithViewRestrictions, createPersonalSpaceForCurrentUser, createSpaceViaWebUI, createTestGroupViaHelper, createUserViaHelper, downloadToTempFile, editBlogLabels, editBlogPostContent, editPageContent, editPageContent, editPageLabels, editPageWithContent, getBaseUrl, getEventLatch, getFriendlyRelativeDate, getTestProperty, getTestPropertyAsInt, getUserGroups, gotoPageWithError, importGlobalBackup, importMail, importSpaceBackup, isClustered, logInAs, loginAs, loginAsTestUser2, makeParams, makeParams, makeParams, makeParams, makeParams, makeParams, makeParams, movePage, movePageToNewParent, movePageToNewSpace, openInsertImagePopup, removePageOrBlogById, restoreBaseUrl, revokeGlobalPermissionFromUser, revokeSpacePermissionFromGroup, revokeSpacePermissionFromUser, rpcAddComment, rpcAddTestComment, rpcCreateSpace, rpcCreateSpaceGroup, rpcFlushAllCaches, rpcGetChildren, rpcGetComments, rpcGetLocalisedText, rpcGetMailQueueSize, rpcGetTopLevelPages, rpcGetUserGroups, rpcGetUsersForActivity, rpcGetUserToken, rpcGrantGlobalPermission, rpcHasGroup, rpcHasUser, rpclogCommandOutput, rpcMovePage, rpcMovePageToTopLevel, rpcPauseJob, rpcRemoveAllSpaceGroups, rpcRemoveAttachment, rpcRemoveComment, rpcRemoveComment, rpcRemoveGlobalPermissions, rpcRemoveUserUncleanly, rpcRenderContent, rpcResumeJob, rpcStartActivity, rpcStoreBlogEntry, setAllowCamelCase, setDailyEmailPreference, setEditPermissionsForGroups, setEditPermissionsForUsers, setEmailFormatPreference, setEnableWysiwyg, setExternalUserManagement, setHttpCompression, setSharedMode, setUp, shutdownQuartz, stripContext, viewLanguages, viewPeopleDirectory, viewProfile, viewSpaceSummary, waitForLongRunningTaskToComplete, watchPage, watchSpace, xmlRpcExecute
 
Methods inherited from class com.atlassian.confluence.AbstractAtlassianWebTestCase
assertContains, assertDoesNotContain, assertElementNotPresentByXPath, assertElementPresentByXPath, assertEndsWith, assertLinkPresent, assertLinkPresentWithHref, assertLinkPresentWithImage, assertLinkPresentWithText, assertLinkPresentWithTextAndHref, assertPageTitleEquals, assertServerResponseContains, assertServerResponseDoesNotContain, assertStartsWith, assertStatusCode, assertTextNotPresent, assertTextsPresentInOrder, assertTextsPresentInOrder, assertTitleEquals
 
Methods inherited from class net.sourceforge.jwebunit.junit.WebTestCase
assertButtonNotPresent, assertButtonNotPresentWithText, assertButtonPresent, assertButtonPresentWithText, assertCheckboxNotPresent, assertCheckboxNotPresent, assertCheckboxNotSelected, assertCheckboxNotSelected, assertCheckboxPresent, assertCheckboxPresent, assertCheckboxSelected, assertCheckboxSelected, assertCookiePresent, assertCookieValueEquals, assertCookieValueMatch, assertDownloadedFileEquals, assertElementNotPresent, assertElementPresent, assertFormElementEmpty, assertFormElementEquals, assertFormElementMatch, assertFormElementNotPresent, assertFormElementPresent, assertFormNotPresent, assertFormNotPresent, assertFormPresent, assertFormPresent, assertFramePresent, assertHiddenFieldPresent, assertImagePresent, assertImageValidAndStore, assertKeyInTable, assertKeyInTable, assertKeyNotInTable, assertKeyNotPresent, assertKeyNotPresent, assertKeyPresent, assertKeyPresent, assertKeysInTable, assertKeysInTable, assertLinkNotPresent, assertLinkNotPresentWithExactText, assertLinkNotPresentWithExactText, assertLinkNotPresentWithImage, assertLinkNotPresentWithText, assertLinkNotPresentWithText, assertLinkPresentWithExactText, assertLinkPresentWithExactText, assertLinkPresentWithText, assertMatch, assertMatchInElement, assertMatchInTable, assertMatchInTable, assertNoMatch, assertNoMatchInElement, assertNoMatchInTable, assertNoMatchInTable, assertRadioOptionNotPresent, assertRadioOptionNotSelected, assertRadioOptionPresent, assertRadioOptionSelected, assertResetButtonNotPresent, assertResetButtonNotPresent, assertResetButtonPresent, assertResetButtonPresent, assertSelectedOptionEquals, assertSelectedOptionMatches, assertSelectedOptionsEqual, assertSelectedOptionsMatch, assertSelectedOptionValueEquals, assertSelectedOptionValuesEqual, assertSelectOptionNotPresent, assertSelectOptionPresent, assertSelectOptionsEqual, assertSelectOptionsNotEqual, assertSelectOptionsPresent, assertSelectOptionValueNotPresent, assertSelectOptionValuePresent, assertSelectOptionValuesEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesPresent, assertSubmitButtonNotPresent, assertSubmitButtonNotPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertTableEquals, assertTableEquals, assertTableMatch, assertTableMatch, assertTableNotPresent, assertTablePresent, assertTableRowCountEquals, assertTableRowsEqual, assertTableRowsEqual, assertTableRowsMatch, assertTableRowsMatch, assertTextFieldEquals, assertTextInElement, assertTextInTable, assertTextInTable, assertTextNotInElement, assertTextNotInTable, assertTextNotInTable, assertTextPresent, assertTitleEqualsKey, assertTitleEqualsKey, assertTitleMatch, assertWindowCountEquals, assertWindowPresent, assertWindowPresent, assertWindowPresentWithTitle, beginAt, clickButtonWithText, clickElementByXPath, clickLinkWithExactText, clickLinkWithExactText, clickRadioOption, closeBrowser, closeWindow, dumpCookies, dumpHtml, dumpHtml, dumpTable, getDialog, getElementAttributByXPath, getElementTextByXPath, getFormElementValue, getImage, getMessage, getMessage, getPageSource, getServeurResponse, getTable, getTestContext, getTester, getTestingEngineKey, gotoFrame, gotoPage, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, reset, runBare, saveAs, selectOption, selectOptionByValue, selectOptions, selectOptionsByValues, setDialog, setExpectedJavaScriptAlert, setExpectedJavaScriptAlert, setExpectedJavaScriptConfirm, setExpectedJavaScriptConfirm, setExpectedJavaScriptPrompt, setExpectedJavaScriptPrompt, setScriptingEnabled, setTestContext, setTestingEngineKey, setTextField, setWorkingForm, setWorkingForm, setWorkingForm, submit, submit
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

public Node(java.lang.String name,
            java.lang.String nodeBaseUrl)
     throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

generateBaseUrl

protected java.lang.String generateBaseUrl()
Overrides:
generateBaseUrl in class AbstractConfluenceAcceptanceTest
Returns:
the base URL which was passed to the constructor

logInAsAdmin

public void logInAsAdmin()
Overrides:
logInAsAdmin in class AbstractConfluenceAcceptanceTest

addComment

public void addComment(java.lang.String spaceKey,
                       java.lang.String pageTitle,
                       java.lang.String comment)
Overrides:
addComment in class AbstractConfluenceAcceptanceTest

addCommentToBlogPost

public void addCommentToBlogPost(java.lang.String spaceKey,
                                 java.lang.String newsTitle,
                                 java.lang.String comment)
Overrides:
addCommentToBlogPost in class AbstractConfluenceAcceptanceTest

addSpaceLabel

public void addSpaceLabel(java.lang.String labelName)
Overrides:
addSpaceLabel in class AbstractConfluenceAcceptanceTest

addUserProfilePicture

public void addUserProfilePicture(java.lang.String fileName)
Description copied from class: AbstractConfluenceAcceptanceTest
Adds the given File as the user's profile picture

Overrides:
addUserProfilePicture in class AbstractConfluenceAcceptanceTest
Parameters:
fileName - Filename

addWatchPage

public ViewContentBean addWatchPage()
                             throws java.lang.Exception
Overrides:
addWatchPage in class AbstractConfluenceAcceptanceTest
Throws:
java.lang.Exception

assertCollectionContainsKeyWithValue

public void assertCollectionContainsKeyWithValue(java.util.Collection collection,
                                                 java.lang.String key,
                                                 java.lang.String value)
                                          throws java.lang.Exception
Overrides:
assertCollectionContainsKeyWithValue in class AbstractAtlassianWebTestCase
Throws:
java.lang.Exception

assertTitleEquals

public void assertTitleEquals(java.lang.String pageTitle,
                              java.lang.String spaceTitle)
Description copied from class: AbstractAtlassianWebTestCase
Asserts that the title equals the passed pageTitle plus separator plus spaceTitle plus site suffix (usually SITE_TITLE_SUFFIX).
e.g. "Home - Test Space - Confluence"

Overrides:
assertTitleEquals in class AbstractAtlassianWebTestCase
Parameters:
pageTitle - The title displayed before the first separator
spaceTitle - The title displayed for the tested space

attachFile

public void attachFile(java.io.File attachment,
                       java.lang.String comment)
Description copied from class: AbstractConfluenceAcceptanceTest
Click the attach file link, attach a given file with a given comment and submit the attachment form.

Overrides:
attachFile in class AbstractConfluenceAcceptanceTest
Parameters:
attachment - the file attachment
comment - the comment for the attachment

clickButton

public void clickButton(java.lang.String string)
Overrides:
clickButton in class net.sourceforge.jwebunit.junit.WebTestCase

openInsertLinkPopup

public void openInsertLinkPopup()
Description copied from class: AbstractConfluenceAcceptanceTest
Clicks the "Insert Link" button, if it exists, on the current page (expected to be the "Add" or "Edit" page)

Focus will then be moved to the popup window

Overrides:
openInsertLinkPopup in class AbstractConfluenceAcceptanceTest

clickLink

public void clickLink(java.lang.String string)
Overrides:
clickLink in class net.sourceforge.jwebunit.junit.WebTestCase

clickLinkWithImage

public void clickLinkWithImage(java.lang.String string)
Overrides:
clickLinkWithImage in class net.sourceforge.jwebunit.junit.WebTestCase

clickLinkWithText

public void clickLinkWithText(java.lang.String string)
Overrides:
clickLinkWithText in class net.sourceforge.jwebunit.junit.WebTestCase

clickLinkWithText

public void clickLinkWithText(java.lang.String string,
                              int i)
Overrides:
clickLinkWithText in class net.sourceforge.jwebunit.junit.WebTestCase

createBlog

public void createBlog(java.lang.String spaceName,
                       java.lang.String title,
                       java.lang.String body)
Overrides:
createBlog in class AbstractConfluenceAcceptanceTest

createGroup

public void createGroup(java.lang.String group)
Description copied from class: AbstractConfluenceAcceptanceTest
Create a group via the Web Interface. This should only be used where the web interface itself is being tested. It cannot be used when the UserRepository being tested is unmodifiable.

Overrides:
createGroup in class AbstractConfluenceAcceptanceTest

createMail

public void createMail(java.io.File mail,
                       java.lang.String spaceKey)
Overrides:
createMail in class AbstractConfluenceAcceptanceTest

createPage

public ViewContentBean createPage(java.lang.String spaceName,
                                  java.lang.String title,
                                  java.lang.String body,
                                  java.lang.String parentPageTitle)
Overrides:
createPage in class AbstractConfluenceAcceptanceTest

createPersonalSpace

public void createPersonalSpace(java.lang.String fullname)
Overrides:
createPersonalSpace in class AbstractConfluenceAcceptanceTest

createSpaceViaWebUI

public void createSpaceViaWebUI(java.lang.String key,
                                java.lang.String name,
                                java.lang.String description)
Overrides:
createSpaceViaWebUI in class AbstractConfluenceAcceptanceTest

createSpaceViaWebUi

public void createSpaceViaWebUi(Space space)
Overrides:
createSpaceViaWebUi in class AbstractConfluenceAcceptanceTest

createTemplate

public void createTemplate(java.lang.String spaceName,
                           java.lang.String templateTitle,
                           java.lang.String templateDescription,
                           java.lang.String templateContent)
Overrides:
createTemplate in class AbstractConfluenceAcceptanceTest

createTestSpaceViaWebUI

public void createTestSpaceViaWebUI()
Description copied from class: AbstractConfluenceAcceptanceTest
For those times we need to ensure a space was created via the web UI (For example if the web UI may behave differently to RPC)

Overrides:
createTestSpaceViaWebUI in class AbstractConfluenceAcceptanceTest

removeGroup

public void removeGroup(java.lang.String groupName)
Description copied from class: AbstractConfluenceAcceptanceTest
Delete a group via the Web Interface. This should only be used where the web interface itself is being tested. It cannot be used when the UserRepository being tested is unmodifiable.

Overrides:
removeGroup in class AbstractConfluenceAcceptanceTest

disableAnonymousAccess

public void disableAnonymousAccess()
Overrides:
disableAnonymousAccess in class AbstractConfluenceAcceptanceTest

disableAnonymousRemoteApi

public void disableAnonymousRemoteApi()

disablePublicSignup

public void disablePublicSignup()

disableRemoteApi

public void disableRemoteApi()

disableThreadedComments

public void disableThreadedComments()

editPage

public void editPage(java.lang.String spaceKey,
                     java.lang.String pageTitle)
Overrides:
editPage in class AbstractConfluenceAcceptanceTest

editPageWithContent

public void editPageWithContent(java.lang.String spaceKey,
                                java.lang.String title,
                                java.lang.String newContent)
Overrides:
editPageWithContent in class AbstractConfluenceAcceptanceTest

editProfile

public void editProfile(java.lang.String info)
Overrides:
editProfile in class AbstractConfluenceAcceptanceTest

editSpacePermsForm

public void editSpacePermsForm()
Overrides:
editSpacePermsForm in class AbstractConfluenceAcceptanceTest

emptyTrash

public void emptyTrash()
Overrides:
emptyTrash in class AbstractConfluenceAcceptanceTest

enableAnonymousAccess

public void enableAnonymousAccess()
Overrides:
enableAnonymousAccess in class AbstractConfluenceAcceptanceTest

enableAnonymousAccessToSpace

public void enableAnonymousAccessToSpace(java.lang.String spaceKey)
Overrides:
enableAnonymousAccessToSpace in class AbstractConfluenceAcceptanceTest

setAnonymousRemoteApi

public void setAnonymousRemoteApi(boolean enabled)
Overrides:
setAnonymousRemoteApi in class AbstractConfluenceAcceptanceTest

setNotifyOnMyActions

public void setNotifyOnMyActions(boolean notify)
Overrides:
setNotifyOnMyActions in class AbstractConfluenceAcceptanceTest

setPublicSignup

public void setPublicSignup(boolean enabled)
Overrides:
setPublicSignup in class AbstractConfluenceAcceptanceTest

setRemoteApi

public void setRemoteApi(boolean enabled)
Overrides:
setRemoteApi in class AbstractConfluenceAcceptanceTest

setThreadedComments

public void setThreadedComments(boolean enable)
Overrides:
setThreadedComments in class AbstractConfluenceAcceptanceTest

logout

public void logout()
Overrides:
logout in class AbstractConfluenceAcceptanceTest

setFormElement

public void setFormElement(java.lang.String formElementName,
                           java.lang.String value)
Overrides:
setFormElement in class net.sourceforge.jwebunit.junit.WebTestCase

uncheckCheckbox

public void uncheckCheckbox(java.lang.String checkBoxName)
Overrides:
uncheckCheckbox in class net.sourceforge.jwebunit.junit.WebTestCase

uncheckCheckbox

public void uncheckCheckbox(java.lang.String checkBoxName,
                            java.lang.String value)
Overrides:
uncheckCheckbox in class net.sourceforge.jwebunit.junit.WebTestCase

dumpTable

public void dumpTable(java.lang.String tableNameOrId,
                      java.io.PrintStream stream)
Overrides:
dumpTable in class net.sourceforge.jwebunit.junit.WebTestCase

checkCheckbox

public void checkCheckbox(java.lang.String checkBoxName,
                          java.lang.String value)
Overrides:
checkCheckbox in class net.sourceforge.jwebunit.junit.WebTestCase

checkCheckbox

public void checkCheckbox(java.lang.String checkBoxName)
Overrides:
checkCheckbox in class net.sourceforge.jwebunit.junit.WebTestCase

ensureTestUserCanViewTestSpace

public void ensureTestUserCanViewTestSpace()
Overrides:
ensureTestUserCanViewTestSpace in class AbstractConfluenceAcceptanceTest

ensureUserCanViewSpace

public void ensureUserCanViewSpace(java.lang.String user,
                                   java.lang.String spaceTitle)
Overrides:
ensureUserCanViewSpace in class AbstractConfluenceAcceptanceTest

getAppContext

public java.lang.String getAppContext()
Overrides:
getAppContext in class AbstractConfluenceAcceptanceTest

getPageId

public long getPageId(java.lang.String spaceKey,
                      java.lang.String title)
Overrides:
getPageId in class AbstractConfluenceAcceptanceTest

getTestSpace

public Space getTestSpace()
Overrides:
getTestSpace in class AbstractConfluenceAcceptanceTest

getTodaysBlogPostDate

public java.lang.String getTodaysBlogPostDate()
Overrides:
getTodaysBlogPostDate in class AbstractConfluenceAcceptanceTest

goToEditGeneralConfiguration

public void goToEditGeneralConfiguration()
Overrides:
goToEditGeneralConfiguration in class AbstractConfluenceAcceptanceTest

grantAnonymousUseConfluencePermission

public void grantAnonymousUseConfluencePermission()
Overrides:
grantAnonymousUseConfluencePermission in class AbstractConfluenceAcceptanceTest

grantGlobalBrowsePermissionToGroup

public void grantGlobalBrowsePermissionToGroup(java.lang.String groupName)
Overrides:
grantGlobalBrowsePermissionToGroup in class AbstractConfluenceAcceptanceTest

grantGlobalPermissionToGroup

public void grantGlobalPermissionToGroup(java.lang.String permissionType,
                                         java.lang.String groupName)
Overrides:
grantGlobalPermissionToGroup in class AbstractConfluenceAcceptanceTest

grantGlobalPermissionToUser

public void grantGlobalPermissionToUser(java.lang.String permissionType,
                                        java.lang.String userName)
Overrides:
grantGlobalPermissionToUser in class AbstractConfluenceAcceptanceTest

grantSpacePermissionToGroup

public void grantSpacePermissionToGroup(java.lang.String spaceKey,
                                        java.lang.String permissionType,
                                        java.lang.String groupName)
Description copied from class: AbstractConfluenceAcceptanceTest
Grant view space permissions and one other space permission to a specified group. Grants the permission via the web interface. Must already be logged in as a user with permission to set permissions on the space. Group must not already have view space permissions for the space.

Overrides:
grantSpacePermissionToGroup in class AbstractConfluenceAcceptanceTest
Parameters:
spaceKey - the key of the existing space.
permissionType - one of the strings in SpacePermission, eg SpacePermission.SYSTEM_ADMINISTRATOR_PERMISSION
groupName - The name of the group.

grantSpacePermissionToUser

public void grantSpacePermissionToUser(java.lang.String spaceKey,
                                       java.lang.String permissionType,
                                       java.lang.String userName)
Description copied from class: AbstractConfluenceAcceptanceTest
Grant view space permissions and one other space permission to a specified user. Grants the permission via the web interface. Must already be logged in as a user with permission to set permissions on the space. User must not already have view space permissions for the space.

Overrides:
grantSpacePermissionToUser in class AbstractConfluenceAcceptanceTest
Parameters:
spaceKey - the key of the existing space.
permissionType - one of the strings in SpacePermission, eg SpacePermission.SYSTEM_ADMINISTRATOR_PERMISSION
userName - The name of the user.

grantViewSpacePermissionToGroup

public void grantViewSpacePermissionToGroup(java.lang.String spaceKey,
                                            java.lang.String groupName)
Overrides:
grantViewSpacePermissionToGroup in class AbstractConfluenceAcceptanceTest

grantViewSpacePermissionToUser

public void grantViewSpacePermissionToUser(java.lang.String spaceKey,
                                           java.lang.String username)
Overrides:
grantViewSpacePermissionToUser in class AbstractConfluenceAcceptanceTest

logInAs

public void logInAs(java.lang.String username,
                    java.lang.String password)
Overrides:
logInAs in class AbstractConfluenceAcceptanceTest

logInAs

public void logInAs(java.lang.String username,
                    java.lang.String password,
                    boolean fastMode)

loginAsTestUser

public void loginAsTestUser()
Overrides:
loginAsTestUser in class AbstractConfluenceAcceptanceTest

movePage

public void movePage(java.lang.String spaceKey,
                     java.lang.String title,
                     java.lang.String newSpaceName,
                     java.lang.String newParentPage)
Overrides:
movePage in class AbstractConfluenceAcceptanceTest

movePageToNewParent

public void movePageToNewParent(java.lang.String spaceKey,
                                java.lang.String title,
                                java.lang.String newParentPage)
Overrides:
movePageToNewParent in class AbstractConfluenceAcceptanceTest

pause

public void pause(long milliseconds)
Description copied from class: AbstractConfluenceAcceptanceTest
We use pause because mysql is not very good at distinguishing times that are close together. The result is unpredictable ordering of search results and intermittent failure of tests.

Overrides:
pause in class AbstractConfluenceAcceptanceTest
Parameters:
milliseconds - the time to pause

removeBlog

public void removeBlog(java.lang.String spaceKey,
                       java.lang.String postDateString,
                       java.lang.String postTitle)
Overrides:
removeBlog in class AbstractConfluenceAcceptanceTest

revokeGlobalPermissionFromGroup

public void revokeGlobalPermissionFromGroup(java.lang.String permissionType,
                                            java.lang.String groupName)
Description copied from class: AbstractConfluenceAcceptanceTest
Removes the specified global permission (from SpacePermission) from the given group name

Overrides:
revokeGlobalPermissionFromGroup in class AbstractConfluenceAcceptanceTest
Parameters:
permissionType - the permissiont type
groupName - the group to remove the permission from

removePersonalSpace

public void removePersonalSpace(java.lang.String username)
Overrides:
removePersonalSpace in class AbstractConfluenceAcceptanceTest

removeTestUser1

public void removeTestUser1()
Description copied from class: AbstractConfluenceAcceptanceTest
Remove testUser1 via the Web Interface. This should only be used where the web interface itself is being tested. It cannot be used when the UserRepository being tested is unmodifiable.

Overrides:
removeTestUser1 in class AbstractConfluenceAcceptanceTest

removeUser

public void removeUser(java.lang.String username)
Description copied from class: AbstractConfluenceAcceptanceTest
Remove a user via the Web Interface. This should only be used where the web interface itself is being tested. It cannot be used when the UserRepository being tested is unmodifiable.

Overrides:
removeUser in class AbstractConfluenceAcceptanceTest

renamePage

public void renamePage(java.lang.String spaceKey,
                       java.lang.String originalPageTitle,
                       java.lang.String newPageTitle)
Overrides:
renamePage in class AbstractConfluenceAcceptanceTest

revokeAnonymousUseConfluencePermission

public void revokeAnonymousUseConfluencePermission()
Overrides:
revokeAnonymousUseConfluencePermission in class AbstractConfluenceAcceptanceTest

rpcAddComment

public java.util.Hashtable rpcAddComment(java.lang.String token,
                                         long pageId,
                                         java.lang.String comment)
Description copied from class: AbstractConfluenceAcceptanceTest
Adds a comment to a page via the XML-RPC interface

Overrides:
rpcAddComment in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
pageId - the ID of the page to add the comment to
comment - the text of the comment
Returns:
the comment as a hash table

rpcAddComment

public java.util.Hashtable rpcAddComment(java.lang.String token,
                                         java.lang.String spaceKey,
                                         java.lang.String pageTitle,
                                         java.lang.String comment)
Description copied from class: AbstractConfluenceAcceptanceTest
Adds a comment to a page via the XML-RPC interface

Overrides:
rpcAddComment in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - the space key of the page
pageTitle - the title of the page
comment - the text of the comment
Returns:
the comment as a hash table

rpcAddLabelToBlog

public void rpcAddLabelToBlog(java.lang.String token,
                              java.lang.String label,
                              long blogId)
Description copied from class: AbstractConfluenceAcceptanceTest
Adds a label to the blogpost with the given page ID

Overrides:
rpcAddLabelToBlog in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
label - the label to be added to the Page
blogId - the ID of the page

rpcAddLabelToPage

public void rpcAddLabelToPage(java.lang.String token,
                              java.lang.String label,
                              long pageId)
Description copied from class: AbstractConfluenceAcceptanceTest
Adds a label to the Page with the given page ID

Overrides:
rpcAddLabelToPage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
label - the label to be added to the Page
pageId - the ID of the page

rpcAddLabelToPage

public void rpcAddLabelToPage(java.lang.String token,
                              java.lang.String label,
                              java.lang.String spaceKey,
                              java.lang.String pageTitle)
Description copied from class: AbstractConfluenceAcceptanceTest
Adds a label to the Page with the given details

This method retrieves the ID for the given Page and passes it onto the appropriate rpcAddLabelToPage method

Overrides:
rpcAddLabelToPage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
label - the label to be added to the page
spaceKey - the key of the Space the page is located in
pageTitle - the title of the Page

rpcAddLabelToSpace

public void rpcAddLabelToSpace(java.lang.String token,
                               java.lang.String label,
                               java.lang.String spaceKey)
Description copied from class: AbstractConfluenceAcceptanceTest
Adds a label to a space

Overrides:
rpcAddLabelToSpace in class AbstractConfluenceAcceptanceTest
Parameters:
token - the token identifying the user
label - the label name (namespaces allowed)
spaceKey - the space key

addUserToGroupViaHelper

public void addUserToGroupViaHelper(java.lang.String token,
                                    java.lang.String username,
                                    java.lang.String groupname)
Description copied from class: AbstractConfluenceAcceptanceTest
Adds the given user to a groupname

Overrides:
addUserToGroupViaHelper in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
username - the username of the user to be added
groupname - the group the user should be added to

rpcCreateBlogPost

public long rpcCreateBlogPost(java.lang.String token,
                              java.lang.String spaceKey,
                              java.lang.String postTitle,
                              java.lang.String postContent)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates a new blog entry via the XML-RPC interface

Overrides:
rpcCreateBlogPost in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - the key of the Space the blog entry will be created in
postTitle - the title of the post to be created
postContent - the content of the post to be created
Returns:
returns the id of the new blogpost

createGroupViaHelper

public void createGroupViaHelper(java.lang.String token,
                                 java.lang.String groupName)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates a group with the given name

Overrides:
createGroupViaHelper in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
groupName - the name of the group to be created

rpcCreatePage

public long rpcCreatePage(java.lang.String token,
                          java.lang.String spaceKey,
                          java.lang.String title,
                          java.lang.String content)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates a page via the XML-RPC interface

Overrides:
rpcCreatePage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - the key for the space the page will be created in
title - the title of the new page
content - the content of the new page
Returns:
the page id

rpcCreatePage

public long rpcCreatePage(java.lang.String token,
                          java.lang.String spaceKey,
                          java.lang.String title,
                          java.lang.String content,
                          long parentPageId)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates a page via the XML-RPC interface

Overrides:
rpcCreatePage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - the key for the space the page will be created in
title - the title of the new page
content - the content of the new page
parentPageId - the id of the parent page, 0 if none.
Returns:
the page id

rpcCreatePersonalSpace

public java.util.Hashtable rpcCreatePersonalSpace(java.lang.String token,
                                                  java.lang.String name,
                                                  java.lang.String description,
                                                  java.lang.String username)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates a personal space via the XML-RPC interface

Overrides:
rpcCreatePersonalSpace in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
name - the name of the Space
description - the description of the Space
username - name of the user to own the space
Returns:
the space as a hashtable

rpcCreateSpace

public java.util.Hashtable rpcCreateSpace(java.lang.String token,
                                          java.lang.String key,
                                          java.lang.String name,
                                          java.lang.String description)
Overrides:
rpcCreateSpace in class AbstractConfluenceAcceptanceTest

rpcConvertToPersonalSpace

public void rpcConvertToPersonalSpace(java.lang.String token,
                                      java.lang.String userName,
                                      java.lang.String spaceKey,
                                      java.lang.String newName,
                                      boolean updateLinks)
Overrides:
rpcConvertToPersonalSpace in class AbstractConfluenceAcceptanceTest

rpcCreateTestPage

public long rpcCreateTestPage(java.lang.String token)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates the test page in the test space via the XML-RPC interface

Overrides:
rpcCreateTestPage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
Returns:
the page id

rpcCreateTestSpace

public java.util.Hashtable rpcCreateTestSpace(java.lang.String token)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates the test space via the XML-RPC interface

This method first checks if the test space exists, and logs a message if it does

Overrides:
rpcCreateTestSpace in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
Returns:
the space as a hash table

rpcCreateTestSpace2

public java.util.Hashtable rpcCreateTestSpace2(java.lang.String token)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates the 2nd test space via the XML-RPC interface

This method first checks if the test space exists, and logs a message if it does

Overrides:
rpcCreateTestSpace2 in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
Returns:
the space as a hashtable

createTestUser1ViaHelper

public void createTestUser1ViaHelper(java.lang.String token)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates the test user via the XML-RPC interface

Overrides:
createTestUser1ViaHelper in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token

createTestUser2ViaHelper

public void createTestUser2ViaHelper(java.lang.String token)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates the 2nd test user via the XML-RPC interface

Overrides:
createTestUser2ViaHelper in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token

createUserViaHelper

public void createUserViaHelper(java.lang.String token,
                                java.lang.String username,
                                java.lang.String password,
                                java.lang.String fullName,
                                java.lang.String email)
Description copied from class: AbstractConfluenceAcceptanceTest
Creates a new user with the given details via the XML-RPC interface

Overrides:
createUserViaHelper in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
username - the username of the new user
password - the password of the new user
fullName - the full name of the new user
email - the email of the new user

rpcEditBlogPost

public void rpcEditBlogPost(java.lang.String token,
                            long entryId,
                            java.lang.String newTitle,
                            java.lang.String newContent)
Description copied from class: AbstractConfluenceAcceptanceTest
Modifies the page with the given details via the XML-RPC interface

Overrides:
rpcEditBlogPost in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
entryId - the ID of the blog entry
newTitle - the new title of the Blog Post (null if the same)
newContent - the new content of the Blog Post (null if the same)

rpcEditPage

public void rpcEditPage(java.lang.String token,
                        java.lang.String spaceKey,
                        java.lang.String pageTitle,
                        java.lang.String newTitle,
                        java.lang.String newContent)
Description copied from class: AbstractConfluenceAcceptanceTest
Modifies the page with the given details via the XML-RPC interface

Overrides:
rpcEditPage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - the key of the Space the Page is in
pageTitle - the current title of the Page
newTitle - the new title of the Page (null if the same)
newContent - the new content of the Page (null if the same)

rpcFlushIndexQueue

public void rpcFlushIndexQueue()
Overrides:
rpcFlushIndexQueue in class AbstractConfluenceAcceptanceTest

rpcGetAdminToken

public java.lang.String rpcGetAdminToken()
Description copied from class: AbstractConfluenceAcceptanceTest
Retrieves a token for the admin user

Overrides:
rpcGetAdminToken in class AbstractConfluenceAcceptanceTest
Returns:
Token for the admin user

rpcGetBlogPostId

public long rpcGetBlogPostId(java.lang.String token,
                             java.lang.String spaceKey,
                             int dayOfMonth,
                             java.lang.String postTitle)
Description copied from class: AbstractConfluenceAcceptanceTest
Retrieves the ID of a blog post with the given details

Overrides:
rpcGetBlogPostId in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - the key of the Space the blog post is located int
dayOfMonth - the day of the month the blog post was made
postTitle - the title of the blog post
Returns:
ID of the post

rpcGetPageId

public long rpcGetPageId(java.lang.String token,
                         java.lang.String spaceKey,
                         java.lang.String pageTitle)
Description copied from class: AbstractConfluenceAcceptanceTest
Retrieves the page ID for a page with the given details

Overrides:
rpcGetPageId in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - the key of the Space the Page is located in
pageTitle - the title of the page
Returns:
The ID of the page

rpcGetPageLabels

public java.util.List rpcGetPageLabels(java.lang.String token,
                                       long pageId)
Description copied from class: AbstractConfluenceAcceptanceTest
Retrieves the labels assigned to a Page with the given page ID

Overrides:
rpcGetPageLabels in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
pageId - the ID of the page
Returns:
A list of label names as Strings

rpcGetPageLabels

public java.util.List rpcGetPageLabels(java.lang.String token,
                                       java.lang.String spaceKey,
                                       java.lang.String pageTitle)
Description copied from class: AbstractConfluenceAcceptanceTest
Retrieves the labels assigned to a page with the given details

This method retrieves the page ID and passes it onto the appropriate rpcGetPageLabels method

Overrides:
rpcGetPageLabels in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - the key of the space the Page is located in
pageTitle - the title of the Page
Returns:
A list of label names as Strings

rpcGetTestUser2Token

public java.lang.String rpcGetTestUser2Token()
Description copied from class: AbstractConfluenceAcceptanceTest
Retrieves a token for the test user 2

Overrides:
rpcGetTestUser2Token in class AbstractConfluenceAcceptanceTest
Returns:
Token for the test user

rpcGetTestUserToken

public java.lang.String rpcGetTestUserToken()
Description copied from class: AbstractConfluenceAcceptanceTest
Retrieves a token for the test user

Overrides:
rpcGetTestUserToken in class AbstractConfluenceAcceptanceTest
Returns:
Token for the test user

rpcGetUserToken

public java.lang.String rpcGetUserToken(java.lang.String username,
                                        java.lang.String password)
Description copied from class: AbstractConfluenceAcceptanceTest
Retrieves the user token for the given details, for use with the XML-RPC interface

Overrides:
rpcGetUserToken in class AbstractConfluenceAcceptanceTest
Parameters:
username - the username
password - the password
Returns:
Token for the logged in user

rpcGrantAnonymousSpacePermission

public void rpcGrantAnonymousSpacePermission(java.lang.String token,
                                             java.lang.String permission,
                                             java.lang.String spaceKey)
Description copied from class: AbstractConfluenceAcceptanceTest
Grants the given permission to the anonymous user for the given space

Overrides:
rpcGrantAnonymousSpacePermission in class AbstractConfluenceAcceptanceTest
Parameters:
token - the token identifying the current user
permission - the permission to give the anonymous user
spaceKey - the space to grant the permission on

rpcGrantSpacePermission

public void rpcGrantSpacePermission(java.lang.String token,
                                    java.lang.String permission,
                                    java.lang.String username,
                                    java.lang.String spaceKey)
Description copied from class: AbstractConfluenceAcceptanceTest
Grants the given permission to a user for a particular Space

Overrides:
rpcGrantSpacePermission in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
permission - the String corresponding to the permission
username - the user to grant the permission to
spaceKey - the key of the Space to grant the permission in

rpcGrantViewSpacePermission

public void rpcGrantViewSpacePermission(java.lang.String token,
                                        java.lang.String entityName,
                                        java.lang.String spaceKey)
Description copied from class: AbstractConfluenceAcceptanceTest
Convenience method for granting VIEWSPACE permission to a particular user

Overrides:
rpcGrantViewSpacePermission in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
entityName - the username or group name
spaceKey - the key of the Space to grant the permission in

rpcLog

public boolean rpcLog(java.lang.String destination,
                      java.lang.String message)
Overrides:
rpcLog in class AbstractConfluenceAcceptanceTest

rpcLogOutAdmin

public void rpcLogOutAdmin()
Overrides:
rpcLogOutAdmin in class AbstractConfluenceAcceptanceTest

rpcRemoveAnonymousSpacePermission

public void rpcRemoveAnonymousSpacePermission(java.lang.String token,
                                              java.lang.String permission,
                                              java.lang.String spaceKey)
Description copied from class: AbstractConfluenceAcceptanceTest
Removes the given permission for the anonymous user from the given space

Overrides:
rpcRemoveAnonymousSpacePermission in class AbstractConfluenceAcceptanceTest
Parameters:
token - the token identifying the current user
permission - the permission to remove
spaceKey - the space to remove the permission on

rpcRemoveGroup

public void rpcRemoveGroup(java.lang.String token,
                           java.lang.String groupname)
Description copied from class: AbstractConfluenceAcceptanceTest
Removes the given group

Overrides:
rpcRemoveGroup in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
groupname - the group to be removed

rpcRemoveLabelFromPage

public void rpcRemoveLabelFromPage(java.lang.String token,
                                   java.lang.String label,
                                   long pageId)
Description copied from class: AbstractConfluenceAcceptanceTest
Removes the given label from the page with the given page ID

Overrides:
rpcRemoveLabelFromPage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
label - the label name to be removed
pageId - the page ID of the page with the label

rpcRemoveLabelFromPage

public void rpcRemoveLabelFromPage(java.lang.String token,
                                   java.lang.String label,
                                   java.lang.String spaceKey,
                                   java.lang.String pageTitle)
Overrides:
rpcRemoveLabelFromPage in class AbstractConfluenceAcceptanceTest

rpcRemoveLabelFromSpace

public void rpcRemoveLabelFromSpace(java.lang.String token,
                                    java.lang.String label,
                                    java.lang.String spaceKey)
Description copied from class: AbstractConfluenceAcceptanceTest
Removes a label from a space

Overrides:
rpcRemoveLabelFromSpace in class AbstractConfluenceAcceptanceTest
Parameters:
token - the token identifying the user
label - the label name (namespaces allowed)
spaceKey - the space key

rpcRemovePage

public void rpcRemovePage(java.lang.String token,
                          java.lang.String spaceKey,
                          long pageId)
Overrides:
rpcRemovePage in class AbstractConfluenceAcceptanceTest

rpcRemoveSpace

public void rpcRemoveSpace(java.lang.String token,
                           java.lang.String spaceKey)
Description copied from class: AbstractConfluenceAcceptanceTest
Remove a space with the given key via the XML-RPC interface

Overrides:
rpcRemoveSpace in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - the space to remove

rpcRemoveSpacePermission

public void rpcRemoveSpacePermission(java.lang.String token,
                                     java.lang.String permission,
                                     java.lang.String username,
                                     java.lang.String spaceKey)
Description copied from class: AbstractConfluenceAcceptanceTest
Removes the given permission for a user for a particular Space

Overrides:
rpcRemoveSpacePermission in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
permission - the String corresponding to the permission
username - the user to remove the permission from
spaceKey - the key of the Space to grant the permission in

removeTestUser1ViaHelper

public void removeTestUser1ViaHelper(java.lang.String token)
Description copied from class: AbstractConfluenceAcceptanceTest
Removes the test user

Overrides:
removeTestUser1ViaHelper in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token

removeUserViaHelper

public void removeUserViaHelper(java.lang.String token,
                                java.lang.String username)
Description copied from class: AbstractConfluenceAcceptanceTest
Removes a user with the given username

Overrides:
removeUserViaHelper in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
username - the username of the user to remove

removeUserFromGroupViaHelper

public void removeUserFromGroupViaHelper(java.lang.String token,
                                         java.lang.String username,
                                         java.lang.String groupname)
Description copied from class: AbstractConfluenceAcceptanceTest
Removes the given user from the group

Overrides:
removeUserFromGroupViaHelper in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
username - the username of the user to be removed
groupname - the name of the group the user should be removed from

rpcTrashPage

public void rpcTrashPage(java.lang.String token,
                         long pageId)
Description copied from class: AbstractConfluenceAcceptanceTest
Trashes (removes) a page with the given ID

This method converts the long into a String and calls the appropriate rpcTrashPage method

Overrides:
rpcTrashPage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
pageId - ID of the page to be trashed

rpcTrashPage

public void rpcTrashPage(java.lang.String token,
                         java.lang.String pageId)
Description copied from class: AbstractConfluenceAcceptanceTest
Trashes (removes) a page with the given ID

Overrides:
rpcTrashPage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
pageId - ID of the page to be trashed

rpcTrashPage

public void rpcTrashPage(java.lang.String token,
                         java.lang.String spaceKey,
                         java.lang.String pageTitle)
Description copied from class: AbstractConfluenceAcceptanceTest
Trashes (removes) a page with the given details

This method retrieves the page with the given details and calls the appropriate rpcTrashPage method

Overrides:
rpcTrashPage in class AbstractConfluenceAcceptanceTest
Parameters:
token - the authentication token
spaceKey - key of the Space the page is in
pageTitle - title of the page to be trashed

search

public void search(java.lang.String query)
Overrides:
search in class AbstractConfluenceAcceptanceTest

setAttachmentMaxUploadSize

public void setAttachmentMaxUploadSize(long max)
Overrides:
setAttachmentMaxUploadSize in class AbstractConfluenceAcceptanceTest

setDraftSaveInterval

public void setDraftSaveInterval(long seconds)
Overrides:
setDraftSaveInterval in class AbstractConfluenceAcceptanceTest

setEmailMask

public void setEmailMask(java.lang.String setting)
Overrides:
setEmailMask in class AbstractConfluenceAcceptanceTest

setPageLabels

public void setPageLabels(java.lang.String spaceKey,
                          java.lang.String pageTitle,
                          java.lang.String label)
Description copied from class: AbstractConfluenceAcceptanceTest
Add the specified label to the page via the pages edit view.

Overrides:
setPageLabels in class AbstractConfluenceAcceptanceTest
Parameters:
spaceKey - the space key
pageTitle - the page title
label - the labels

setViewPermissionsForGroups

public void setViewPermissionsForGroups(java.lang.String spaceKey,
                                        java.lang.String pageTitle,
                                        java.lang.String group)
Description copied from class: AbstractConfluenceAcceptanceTest

Edit the permissions of the specified page as the current user.

One doesn't need to navigate to the page before calling this method.

Overrides:
setViewPermissionsForGroups in class AbstractConfluenceAcceptanceTest
Parameters:
spaceKey - the space the page belongs to
pageTitle - the title of the page
group - the groups to restrict view permissions to as a comma separated list of group names.

setViewPermissionsForUsers

public void setViewPermissionsForUsers(java.lang.String spaceKey,
                                       java.lang.String pageTitle,
                                       java.lang.String user)
Description copied from class: AbstractConfluenceAcceptanceTest

Edit the permissions of the specified page as the current user.

One doesn't need to navigate to the page before calling this method.

Overrides:
setViewPermissionsForUsers in class AbstractConfluenceAcceptanceTest
Parameters:
spaceKey - the space the page belongs to
pageTitle - the title of the page
user - the users to restrict view permissions to as a comma separated list of usernames.

showAllUsers

public void showAllUsers()
Overrides:
showAllUsers in class AbstractConfluenceAcceptanceTest

submit

public void submit()
Overrides:
submit in class net.sourceforge.jwebunit.junit.WebTestCase

tearDown

public void tearDown()
              throws java.lang.Exception
Description copied from class: AbstractConfluenceAcceptanceTest
Default tearDown method. Removes any files which were added to the AbstractConfluenceAcceptanceTest.filesToDelete list.

Overrides:
tearDown in class AbstractConfluenceAcceptanceTest
Throws:
java.lang.Exception

viewAbstractPage

public void viewAbstractPage(long entityId)
Description copied from class: AbstractConfluenceAcceptanceTest
Views the page for a Page or BlogPost (AbstractPage)

Overrides:
viewAbstractPage in class AbstractConfluenceAcceptanceTest
Parameters:
entityId - the ID of the AbstractPage

viewBlog

public void viewBlog(java.lang.String spaceKey,
                     java.lang.String datePath,
                     java.lang.String title)
Overrides:
viewBlog in class AbstractConfluenceAcceptanceTest

viewEditBlogPostPage

public void viewEditBlogPostPage(long entryId)
Description copied from class: AbstractConfluenceAcceptanceTest
Views the edit blog post page for the post with the given ID

Overrides:
viewEditBlogPostPage in class AbstractConfluenceAcceptanceTest
Parameters:
entryId - the ID of the blog post

viewGlobalAdmin

public void viewGlobalAdmin()
Overrides:
viewGlobalAdmin in class AbstractConfluenceAcceptanceTest

viewGlobalPermissions

public void viewGlobalPermissions()
Overrides:
viewGlobalPermissions in class AbstractConfluenceAcceptanceTest

viewHomepage

public void viewHomepage()
Overrides:
viewHomepage in class AbstractConfluenceAcceptanceTest

viewLabel

public void viewLabel(java.lang.String spaceKey,
                      java.lang.String labelName)
Overrides:
viewLabel in class AbstractConfluenceAcceptanceTest

viewPage

public ViewContentBean viewPage(java.lang.String spaceKey,
                                java.lang.String pageTitle)
Overrides:
viewPage in class AbstractConfluenceAcceptanceTest

viewSpaceAdmin

public void viewSpaceAdmin()
Overrides:
viewSpaceAdmin in class AbstractConfluenceAcceptanceTest

viewSpaceAdvanced

public void viewSpaceAdvanced()
Overrides:
viewSpaceAdvanced in class AbstractConfluenceAcceptanceTest

viewSpaceContent

public void viewSpaceContent()
Overrides:
viewSpaceContent in class AbstractConfluenceAcceptanceTest

viewSpacePermissions

public void viewSpacePermissions(java.lang.String spaceKey)
Overrides:
viewSpacePermissions in class AbstractConfluenceAcceptanceTest

viewSpaceSummary

public void viewSpaceSummary()
Overrides:
viewSpaceSummary in class AbstractConfluenceAcceptanceTest

viewTodaysBlog

public void viewTodaysBlog(java.lang.String spaceKey,
                           java.lang.String title)
Overrides:
viewTodaysBlog in class AbstractConfluenceAcceptanceTest

viewTrash

public void viewTrash()
Overrides:
viewTrash in class AbstractConfluenceAcceptanceTest

viewUser

public void viewUser(java.lang.String name)
Overrides:
viewUser in class AbstractConfluenceAcceptanceTest

assertLinkWithTextExists

public void assertLinkWithTextExists(java.lang.String linkText)

assertSelectBoxContainsOption

public void assertSelectBoxContainsOption(java.lang.String selectName,
                                          java.lang.String optionName)

clickAnyButtonWithValue

public void clickAnyButtonWithValue(java.lang.String value)

clickButtonWithValue

public void clickButtonWithValue(java.lang.String value)

clickSubmitButtonWithValue

public void clickSubmitButtonWithValue(java.lang.String value)

getGroupFromResponse

public java.lang.String getGroupFromResponse(java.lang.String pattern)
Overrides:
getGroupFromResponse in class AbstractAtlassianWebTestCase

generateFile

public java.io.File generateFile(java.lang.String filename,
                                 java.lang.String contents)
Overrides:
generateFile in class AbstractConfluenceAcceptanceTest

getCurrentMailQueueSize

public int getCurrentMailQueueSize()
Overrides:
getCurrentMailQueueSize in class AbstractConfluenceAcceptanceTest

getXmlRpcClient

public org.apache.xmlrpc.XmlRpcClient getXmlRpcClient()


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.