com.atlassian.confluence.selenium
Class AbstractMoveDialogTester

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.confluence.junit3.JUnit3TimingTestCase
              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(java.lang.String s)
           
 
Method Summary
protected  void clickDialogSubmitButton(MovePageDialog dialog)
           
protected  java.util.List<Page> createPageHierarchy(java.lang.String pagePrefix, int depth, Space space)
          Create a simple hierarchy of pages where each page is the parent of the next.
protected  java.lang.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 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 testMovingToSpaceWithDuplicateTitleOfChildPage()
           
 void testMovingToSpaceWithDuplicateTitleOfDescendentPage()
           
 void testMovingToSpaceWithDuplicateTitleOfDescendentPageToTopOfSpace()
           
 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 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()
           
 
Methods inherited from class com.atlassian.confluence.selenium.AbstractSeleniumTest
captureScreenShot, createTestData, runTest, setAjsLogRendered, setAjsLogVisible, tearDown
 
Methods inherited from class com.atlassian.confluence.junit3.JUnit3TimingTestCase
runBare, setExceptionTransformer
 
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
 
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(java.lang.String s)
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class AbstractSeleniumTest
Throws:
java.lang.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 java.lang.Exception
Throws:
java.lang.Exception

getDialogTitle

protected java.lang.String getDialogTitle()

testMovePageToKnownLocation

public void testMovePageToKnownLocation()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testTreeScrollsToShowCurrentParent

public void testTreeScrollsToShowCurrentParent()
                                        throws java.lang.Exception
Throws:
java.lang.Exception

testChangingSpaceThenCancel

public void testChangingSpaceThenCancel()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testClickingPageThenCancel

public void testClickingPageThenCancel()
                                throws java.lang.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:
java.lang.Exception

testTreeMoveToHomePageOfAnotherSpace

public void testTreeMoveToHomePageOfAnotherSpace()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

testMovingToSpaceWithDuplicateTitleOfChildPage

public void testMovingToSpaceWithDuplicateTitleOfChildPage()
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

testMovingToSpaceWithDuplicateTitleOfDescendentPage

public void testMovingToSpaceWithDuplicateTitleOfDescendentPage()
                                                         throws java.lang.Exception
Throws:
java.lang.Exception

testMovingToSpaceWithDuplicateTitleOfDescendentPageToTopOfSpace

public void testMovingToSpaceWithDuplicateTitleOfDescendentPageToTopOfSpace()
                                                                     throws java.lang.Exception
Throws:
java.lang.Exception

testTreeMoveWithinSameSpace

public void testTreeMoveWithinSameSpace()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testTreeMoveToTopOfSameSpace

public void testTreeMoveToTopOfSameSpace()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

testTreeMoveToTopOfNewSpace

public void testTreeMoveToTopOfNewSpace()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testTreeCanDisplayPageWithAmpersandInTitle

public void testTreeCanDisplayPageWithAmpersandInTitle()
                                                throws java.lang.Exception
Throws:
java.lang.Exception

testTreeContainsDescendantsOfMovedPage

public void testTreeContainsDescendantsOfMovedPage()
                                            throws java.lang.Exception
Throws:
java.lang.Exception

testTreeSpaceChangeDoesNotDiscardSelection

public void testTreeSpaceChangeDoesNotDiscardSelection()
                                                throws java.lang.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:
java.lang.Exception

testTreeMoveToSibling

public void testTreeMoveToSibling()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testTreeSpaceNamesAreProperlyEncoded

public void testTreeSpaceNamesAreProperlyEncoded()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

testTreeClicksDoNotNavigate

public void testTreeClicksDoNotNavigate()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

testMoreSearchResultsMessage

public void testMoreSearchResultsMessage()

testReorderWhenNoSiblings

public void testReorderWhenNoSiblings()
                               throws java.lang.Exception
Throws:
java.lang.Exception

testMoveInsertsPageAtEndOfOrderedSiblings

public void testMoveInsertsPageAtEndOfOrderedSiblings()
                                               throws java.lang.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:
java.lang.Exception

testMoveInsertsPageAlphabeticalForUnOrderedSiblings

public void testMoveInsertsPageAlphabeticalForUnOrderedSiblings()
                                                         throws java.lang.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:
java.lang.Exception

testReorderWithoutMoving

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

Throws:
java.lang.Exception

testReorderToFirstUnderSpace

public void testReorderToFirstUnderSpace()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

testReorderToLastUnderSpace

public void testReorderToLastUnderSpace()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

createPageHierarchy

protected java.util.List<Page> createPageHierarchy(java.lang.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-2014 Atlassian. All Rights Reserved.