com.atlassian.confluence.selenium
Class AbstractMoveDialogTester

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.confluence.selenium.AbstractSeleniumTest
              extended by com.atlassian.confluence.selenium.AbstractMoveDialogTester
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
MoveViewedPageTest

public abstract class AbstractMoveDialogTester
extends AbstractSeleniumTest

A base class to be extended by the tests for the Move Dialog. Because this dialog can be launched from multiple different places this class contains all the assertions but expects the subclass to actually perform the actions necessary to launch and dismiss the dialog.


Field Summary
protected  Menus menus
           
protected  Space monkeySpace
           
 
Fields inherited from class com.atlassian.confluence.selenium.AbstractSeleniumTest
adminUser, assertThat, client, rpc, screenShotIndex, suite, testBlogPost, testComment, testData, testGroup, testImage, testImage2, testPage, testSpace, testUser, testUserWithApostrophe, userHelper, users
 
Constructor Summary
AbstractMoveDialogTester(String s)
           
 
Method Summary
protected  void clickDialogSubmitButton(MovePageDialog dialog)
           
protected  List<Page> createPageHierarchy(String pagePrefix, int depth, Space space)
          Create a simple hierarchy of pages where each page is the parent of the next.
protected  String getDialogTitle()
           
protected  void navigateToDialogLaunchPoint(Page page)
          Navigate the client to the point in Confluence where the dialog would be launched from but do not actually display the dialog.
protected  MovePageDialog openDialog()
           
protected  MovePageDialog openDialogFor(Page page)
           
protected  void setUp()
           
protected  void submitMove(MovePageDialog dialog)
           
 void testAvailabilityAndDecoration()
           
 void testCannotChangeSpaceWhenNoRemovePermission()
           
 void testChangingSpace()
           
 void testChangingSpaceThenCancel()
           
 void testClickingPageThenCancel()
          Set up a move to a new parent within the same space and then cancel and ensure that re-opening the dialog returns the tree to it's previous unselected state.
 void testMoreSearchResultsMessage()
           
 void testMoveInsertsPageAlphabeticalForUnOrderedSiblings()
          When a page is moved to a parent that does not have ordered siblings then make sure that the moved page appears alphabetically in the list of siblings.
 void testMoveInsertsPageAtEndOfOrderedSiblings()
          When a page is moved to a parent that has ordered siblings then on the ordered list of siblings the moved page should appear last.
 void testMovePageToKnownLocation()
           
 void testMovingToSpaceWithDuplicateTitle()
           
 void testMovingToSpaceWithDuplicateTitleOfChildPage()
           
 void testMovingToSpaceWithDuplicateTitleOfDescendentPage()
           
 void testMovingToSpaceWithDuplicateTitleOfDescendentPageToTopOfSpace()
           
 void testNoSpacePickerIfNoRemovePermission()
          Ensure that if the user does not have remove permission for the current space then they are not presented with a space picker mechanism.
 void testReorderToFirstUnderSpace()
           
 void testReorderToLastUnderSpace()
           
 void testReorderWhenNoSiblings()
           
 void testReorderWithoutMoving()
          Change the order of a page within it's siblings list without first moving it to a new parent.
 void testTreeCanDisplayPageWithAmpersandInTitle()
           
 void testTreeClicksDoNotNavigate()
           
 void testTreeContainsDescendantsOfMovedPage()
           
 void testTreeDoesNotShowSpaceWithNoCreatePermission()
           
 void testTreeExpandsInOtherLanguages()
           
 void testTreeMoveToHomePageOfAnotherSpace()
           
 void testTreeMoveToSibling()
           
 void testTreeMoveToTopOfNewSpace()
           
 void testTreeMoveToTopOfSameSpace()
           
 void testTreeMoveWithinSameSpace()
           
 void testTreeScrollsToShowCurrentParent()
           
 void testTreeSpaceChangeDoesNotDiscardSelection()
          When a selection is made in the tree and then the space is changed then that old selection should still work if we click 'Move'.
 void testTreeSpaceNamesAreProperlyEncoded()
           
 void testValidationErrorIfMovingPageBeneathItself()
           
 
Methods inherited from class com.atlassian.confluence.selenium.AbstractSeleniumTest
captureScreenShot, createTestData, runBare, runTest, setAjsLogRendered, setAjsLogVisible, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

menus

protected Menus menus

monkeySpace

protected Space monkeySpace
Constructor Detail

AbstractMoveDialogTester

public AbstractMoveDialogTester(String s)
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class AbstractSeleniumTest
Throws:
Exception

navigateToDialogLaunchPoint

protected void navigateToDialogLaunchPoint(Page page)
Navigate the client to the point in Confluence where the dialog would be launched from but do not actually display the dialog.

Parameters:
page - the launch point for the dialog or null if there is no page

openDialogFor

protected MovePageDialog openDialogFor(Page page)

clickDialogSubmitButton

protected void clickDialogSubmitButton(MovePageDialog dialog)

submitMove

protected void submitMove(MovePageDialog dialog)

openDialog

protected MovePageDialog openDialog()

testAvailabilityAndDecoration

public void testAvailabilityAndDecoration()
                                   throws Exception
Throws:
Exception

getDialogTitle

protected String getDialogTitle()

testMovePageToKnownLocation

public void testMovePageToKnownLocation()
                                 throws Exception
Throws:
Exception

testValidationErrorIfMovingPageBeneathItself

public void testValidationErrorIfMovingPageBeneathItself()
                                                  throws Exception
Throws:
Exception

testTreeExpandsInOtherLanguages

public void testTreeExpandsInOtherLanguages()
                                     throws Exception
Throws:
Exception

testTreeScrollsToShowCurrentParent

public void testTreeScrollsToShowCurrentParent()
                                        throws Exception
Throws:
Exception

testCannotChangeSpaceWhenNoRemovePermission

public void testCannotChangeSpaceWhenNoRemovePermission()
                                                 throws Exception
Throws:
Exception

testTreeDoesNotShowSpaceWithNoCreatePermission

public void testTreeDoesNotShowSpaceWithNoCreatePermission()
                                                    throws Exception
Throws:
Exception

testNoSpacePickerIfNoRemovePermission

public void testNoSpacePickerIfNoRemovePermission()
                                           throws Exception
Ensure that if the user does not have remove permission for the current space then they are not presented with a space picker mechanism.

Throws:
Exception

testChangingSpace

public void testChangingSpace()
                       throws Exception
Throws:
Exception

testChangingSpaceThenCancel

public void testChangingSpaceThenCancel()
                                 throws Exception
Throws:
Exception

testClickingPageThenCancel

public void testClickingPageThenCancel()
                                throws Exception
Set up a move to a new parent within the same space and then cancel and ensure that re-opening the dialog returns the tree to it's previous unselected state.

Throws:
Exception

testTreeMoveToHomePageOfAnotherSpace

public void testTreeMoveToHomePageOfAnotherSpace()
                                          throws Exception
Throws:
Exception

testMovingToSpaceWithDuplicateTitle

public void testMovingToSpaceWithDuplicateTitle()
                                         throws Exception
Throws:
Exception

testMovingToSpaceWithDuplicateTitleOfChildPage

public void testMovingToSpaceWithDuplicateTitleOfChildPage()
                                                    throws Exception
Throws:
Exception

testMovingToSpaceWithDuplicateTitleOfDescendentPage

public void testMovingToSpaceWithDuplicateTitleOfDescendentPage()
                                                         throws Exception
Throws:
Exception

testMovingToSpaceWithDuplicateTitleOfDescendentPageToTopOfSpace

public void testMovingToSpaceWithDuplicateTitleOfDescendentPageToTopOfSpace()
                                                                     throws Exception
Throws:
Exception

testTreeMoveWithinSameSpace

public void testTreeMoveWithinSameSpace()
                                 throws Exception
Throws:
Exception

testTreeMoveToTopOfSameSpace

public void testTreeMoveToTopOfSameSpace()
                                  throws Exception
Throws:
Exception

testTreeMoveToTopOfNewSpace

public void testTreeMoveToTopOfNewSpace()
                                 throws Exception
Throws:
Exception

testTreeCanDisplayPageWithAmpersandInTitle

public void testTreeCanDisplayPageWithAmpersandInTitle()
                                                throws Exception
Throws:
Exception

testTreeContainsDescendantsOfMovedPage

public void testTreeContainsDescendantsOfMovedPage()
                                            throws Exception
Throws:
Exception

testTreeSpaceChangeDoesNotDiscardSelection

public void testTreeSpaceChangeDoesNotDiscardSelection()
                                                throws Exception
When a selection is made in the tree and then the space is changed then that old selection should still work if we click 'Move'.

Throws:
Exception

testTreeMoveToSibling

public void testTreeMoveToSibling()
                           throws Exception
Throws:
Exception

testTreeSpaceNamesAreProperlyEncoded

public void testTreeSpaceNamesAreProperlyEncoded()
                                          throws Exception
Throws:
Exception

testTreeClicksDoNotNavigate

public void testTreeClicksDoNotNavigate()
                                 throws Exception
Throws:
Exception

testMoreSearchResultsMessage

public void testMoreSearchResultsMessage()

testReorderWhenNoSiblings

public void testReorderWhenNoSiblings()
                               throws Exception
Throws:
Exception

testMoveInsertsPageAtEndOfOrderedSiblings

public void testMoveInsertsPageAtEndOfOrderedSiblings()
                                               throws Exception
When a page is moved to a parent that has ordered siblings then on the ordered list of siblings the moved page should appear last.

Throws:
Exception

testMoveInsertsPageAlphabeticalForUnOrderedSiblings

public void testMoveInsertsPageAlphabeticalForUnOrderedSiblings()
                                                         throws Exception
When a page is moved to a parent that does not have ordered siblings then make sure that the moved page appears alphabetically in the list of siblings.

Throws:
Exception

testReorderWithoutMoving

public void testReorderWithoutMoving()
                              throws Exception
Change the order of a page within it's siblings list without first moving it to a new parent.

Throws:
Exception

testReorderToFirstUnderSpace

public void testReorderToFirstUnderSpace()
                                  throws Exception
Throws:
Exception

testReorderToLastUnderSpace

public void testReorderToLastUnderSpace()
                                 throws Exception
Throws:
Exception

createPageHierarchy

protected List<Page> createPageHierarchy(String pagePrefix,
                                         int depth,
                                         Space space)
Create a simple hierarchy of pages where each page is the parent of the next. All pages must be in the same space.



Copyright © 2003-2012 Atlassian. All Rights Reserved.