com.atlassian.confluence
Class AttachmentAcceptanceTest

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.AbstractConfluenceAcceptanceTest
                  extended by com.atlassian.confluence.AttachmentAcceptanceTest
All Implemented Interfaces:
junit.framework.Test

public class AttachmentAcceptanceTest
extends AbstractConfluenceAcceptanceTest


Field Summary
static java.lang.String PROPERTIES_LINK_TEXT
           
 
Fields inherited from class com.atlassian.confluence.AbstractConfluenceAcceptanceTest
DASHBOARD_RECENT_UPDATES_URL, log, logAdjuster, RANDOM, rpc, TEST_ADMIN, TEST_BLOG, TEST_COMMENT, TEST_GROUP1, TEST_GROUP2, TEST_PAGE, TEST_SPACE, TEST_SPACE2, TEST_USER1, TEST_USER2, TESTBLOG_CONTENT, TESTBLOG_TITLE, testData, TESTPAGE_COMMENT, TESTPAGE_CONTENT, TESTPAGE_TITLE, TESTSPACE_KEY, TESTSPACE_TITLE, TESTSPACE2_KEY, TESTSPACE2_TITLE, webTester, wikiMarkupRpc
 
Constructor Summary
AttachmentAcceptanceTest()
           
 
Method Summary
protected  void setUp()
          Default setUp method.
 void testAddAttachmentWithCaptchaEnabledAndWrongCaptcha()
           
 void testAttachFileWithSpecialCharacters()
           
 void testAttachmentAuthorshipPreservedOnAttachmentMoveAndComment()
           
 void testAttachmentIconDisplayedAsPageMetaData()
           
 void testAttachmentNamesNotTruncatedOnServerSide()
           
 void testAttachmentPagination()
           
 void testAttachmentProperlyAttributedOnDashboard()
           
 void testAttachmentVersioning()
           
 void testAttachmentWithSimilarNameButDifferentCaseIsAddedAsHistoricalVersion()
          adding Foo.txt when foo.txt exists, should Foo.txt as a version (the case of foo.txt should be preserved)
 void testAttachMultipleFiles()
           
 void testCannotMoveFileToAnotherPageThatDoesNotExist()
           
 void testDownloadAllAttachments()
           
 void testDownloadAllAttachmentsAsAnonymousUser()
           
 void testDownloadAllAttachmentsOnPageLink()
           
 void testDownloadFilesWithPlusSignsAndSpaces()
           
 void testDownloadSingleAttachment()
           
 void testEditingAttachmentWithoutAddAttachmentPermissions()
           
 void testFileNameIsRequired()
           
 void testFilenameWithSpaceIsPercentEncoded()
           
 void testFilterByDifferentCasedFileExtension()
           
 void testFilterByFileExtension()
           
 void testFilterByFileExtensionWithPagination()
           
 void testHighlightAttachmentWithPagination()
           
 void testHtmlAttachmentsAreNotServedInline()
           
 void testInvalidDownloadUrlReturnsFourOhFour()
           
 void testLargeAttachmentNotTruncated()
           
 void testLeavingEditAttachmentRedirectsToCorrectAttachmentsView()
           
 void testLeavingEditAttachmentRedirectsToCorrectViewPage()
           
 void testListSpaceAttachmentsMoreThanMaxResults()
           
 void testMaxAttachmentsInUI()
           
 void testMaxAttachmentSizeRespected()
           
 void testMissingAttachmentOnDrafts()
           
 void testMoveAttachmentToAnotherPageAndBack()
           
 void testMoveAttachmentToUnpermittedPage()
           
 void testMoveAttachmentWithoutRemovePermission()
           
 void testMoveFileToAnotherPage()
           
 void testMoveFileToAnotherSpace()
           
 void testMovingAttachmentDoesNotBreakLinkToOtherAttachmentsWithSameName()
          Test that moving attachments does not update links to unmoved attachments with the same name.
 void testMovingAttachmentDoesNotUpdateLinksWithoutAttachments()
           
 void testMovingAttachmentSimplifiesLinksInNewOwner()
          Test of CONF-9007, that when an attachment is moved, links to it from the new owning page are simplified (Page prefix is removed).
 void testMovingAttachmentToPageWithoutViewPermissions()
           
 void testMovingAttachmentUpdatesLinksOnOriginalOwner()
          Test of CONF-9007, that when an attachment is moved, links to it are updated.
 void testMovingAttachmentUpdatesLinksWithPagePrefix()
          Test of CONF-9007, that when an attachment is moved, links to it are updated.
 void testNotAbleToRenameFileToEmptyFileNameInOtherSpace()
           
 void testNotAbleToRenameFileToExistingFileName()
           
 void testNotAbleToRenameFileToExistingFileNameInOtherSpace()
           
 void testNoXssWithFileRename()
           
 void testRemoveAttachmentAndAllPreviousVersions()
           
 void testRemoveAttachmentAndPreviousVersionsViaAction()
           
 void testRemoveAttachmentAndPreviousVersionsViaActionPreventsInjection()
           
 void testRemoveAttachmentVersions()
           
 void testRemoveCommentOnAttachment()
           
 void testSortingByCreatedDate()
           
 void testUploaderOfNewAttachmentVersionIsAcknowledgedAsCreator()
           
 void testV1andV2AttachmentUrls()
           
 
Methods inherited from class com.atlassian.confluence.AbstractConfluenceAcceptanceTest
adminConsole, attachments, createSpaceViaWebUI, createTestSpaceViaWebUI, directoryConfig, generateBaseUrl, generateFile, getAppContext, getBaseUrl, getConfiguredBaseUrl, getPluginHelper, getServerStateManager, goToBlogCollector, logInAsAdminAtHomepage, loginAsTestUser, loginAsTestUser2, loginAsTestUserAtHomepage, logins, logout, pages, rebuildIndex, setUpTestNG, tearDown, tearDownTestNG, users, viewHomepage, viewSpaceAdmin, viewSpacePermissions, viewSpaceSummary, viewSpaceTools, viewTrash, watchSpace, webAppContextPath
 
Methods inherited from class com.atlassian.confluence.junit3.JUnit3TimingTestCase
runBare, setExceptionTransformer
 
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
 

Field Detail

PROPERTIES_LINK_TEXT

public static final java.lang.String PROPERTIES_LINK_TEXT
See Also:
Constant Field Values
Constructor Detail

AttachmentAcceptanceTest

public AttachmentAcceptanceTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: AbstractConfluenceAcceptanceTest
Default setUp method. Establishes XML-RPC connection and sets the base URL. Also configures LDAP repository.

Overrides:
setUp in class AbstractConfluenceAcceptanceTest
Throws:
java.lang.Exception - from super

testAttachmentProperlyAttributedOnDashboard

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

testAttachmentIconDisplayedAsPageMetaData

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

testAddAttachmentWithCaptchaEnabledAndWrongCaptcha

public void testAddAttachmentWithCaptchaEnabledAndWrongCaptcha()

testMaxAttachmentSizeRespected

public void testMaxAttachmentSizeRespected()

testMaxAttachmentsInUI

public void testMaxAttachmentsInUI()

testAttachMultipleFiles

public void testAttachMultipleFiles()

testAttachmentPagination

public void testAttachmentPagination()
                              throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

testHighlightAttachmentWithPagination

public void testHighlightAttachmentWithPagination()
                                           throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

testAttachFileWithSpecialCharacters

public void testAttachFileWithSpecialCharacters()

testFilenameWithSpaceIsPercentEncoded

public void testFilenameWithSpaceIsPercentEncoded()

testV1andV2AttachmentUrls

public void testV1andV2AttachmentUrls()

testDownloadFilesWithPlusSignsAndSpaces

public void testDownloadFilesWithPlusSignsAndSpaces()
                                             throws java.io.IOException
Throws:
java.io.IOException

testAttachmentWithSimilarNameButDifferentCaseIsAddedAsHistoricalVersion

public void testAttachmentWithSimilarNameButDifferentCaseIsAddedAsHistoricalVersion()
adding Foo.txt when foo.txt exists, should Foo.txt as a version (the case of foo.txt should be preserved)


testRemoveAttachmentAndAllPreviousVersions

public void testRemoveAttachmentAndAllPreviousVersions()

testRemoveAttachmentAndPreviousVersionsViaAction

public void testRemoveAttachmentAndPreviousVersionsViaAction()

testRemoveAttachmentAndPreviousVersionsViaActionPreventsInjection

public void testRemoveAttachmentAndPreviousVersionsViaActionPreventsInjection()

testLeavingEditAttachmentRedirectsToCorrectViewPage

public void testLeavingEditAttachmentRedirectsToCorrectViewPage()

testLeavingEditAttachmentRedirectsToCorrectAttachmentsView

public void testLeavingEditAttachmentRedirectsToCorrectAttachmentsView()

testRemoveAttachmentVersions

public void testRemoveAttachmentVersions()

testFilterByFileExtension

public void testFilterByFileExtension()

testFilterByFileExtensionWithPagination

public void testFilterByFileExtensionWithPagination()

testFilterByDifferentCasedFileExtension

public void testFilterByDifferentCasedFileExtension()

testListSpaceAttachmentsMoreThanMaxResults

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

testDownloadAllAttachmentsOnPageLink

public void testDownloadAllAttachmentsOnPageLink()
                                          throws java.io.IOException,
                                                 org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

testDownloadSingleAttachment

public void testDownloadSingleAttachment()
                                  throws org.xml.sax.SAXException,
                                         java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException

testDownloadAllAttachments

public void testDownloadAllAttachments()

testDownloadAllAttachmentsAsAnonymousUser

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

testFileNameIsRequired

public void testFileNameIsRequired()

testMoveFileToAnotherPage

public void testMoveFileToAnotherPage()

testCannotMoveFileToAnotherPageThatDoesNotExist

public void testCannotMoveFileToAnotherPageThatDoesNotExist()

testMoveAttachmentToAnotherPageAndBack

public void testMoveAttachmentToAnotherPageAndBack()

testMoveFileToAnotherSpace

public void testMoveFileToAnotherSpace()

testNoXssWithFileRename

public void testNoXssWithFileRename()

testNotAbleToRenameFileToExistingFileNameInOtherSpace

public void testNotAbleToRenameFileToExistingFileNameInOtherSpace()

testNotAbleToRenameFileToEmptyFileNameInOtherSpace

public void testNotAbleToRenameFileToEmptyFileNameInOtherSpace()

testNotAbleToRenameFileToExistingFileName

public void testNotAbleToRenameFileToExistingFileName()

testMovingAttachmentUpdatesLinksOnOriginalOwner

public void testMovingAttachmentUpdatesLinksOnOriginalOwner()
                                                     throws java.lang.Exception
Test of CONF-9007, that when an attachment is moved, links to it are updated.

Throws:
java.lang.Exception

testMovingAttachmentSimplifiesLinksInNewOwner

public void testMovingAttachmentSimplifiesLinksInNewOwner()
                                                   throws java.lang.Exception
Test of CONF-9007, that when an attachment is moved, links to it from the new owning page are simplified (Page prefix is removed).

Throws:
java.lang.Exception

testMovingAttachmentUpdatesLinksWithPagePrefix

public void testMovingAttachmentUpdatesLinksWithPagePrefix()
                                                    throws java.lang.Exception
Test of CONF-9007, that when an attachment is moved, links to it are updated.

Throws:
java.lang.Exception

testMovingAttachmentDoesNotUpdateLinksWithoutAttachments

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

testMovingAttachmentDoesNotBreakLinkToOtherAttachmentsWithSameName

public void testMovingAttachmentDoesNotBreakLinkToOtherAttachmentsWithSameName()
                                                                        throws java.lang.Exception
Test that moving attachments does not update links to unmoved attachments with the same name. This is a very edgy edge case indeed.

Throws:
java.lang.Exception

testLargeAttachmentNotTruncated

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

testHtmlAttachmentsAreNotServedInline

public void testHtmlAttachmentsAreNotServedInline()

testAttachmentVersioning

public void testAttachmentVersioning()
                              throws java.io.IOException,
                                     org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

testInvalidDownloadUrlReturnsFourOhFour

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

testUploaderOfNewAttachmentVersionIsAcknowledgedAsCreator

public void testUploaderOfNewAttachmentVersionIsAcknowledgedAsCreator()

testRemoveCommentOnAttachment

public void testRemoveCommentOnAttachment()

testEditingAttachmentWithoutAddAttachmentPermissions

public void testEditingAttachmentWithoutAddAttachmentPermissions()

testMovingAttachmentToPageWithoutViewPermissions

public void testMovingAttachmentToPageWithoutViewPermissions()

testMoveAttachmentWithoutRemovePermission

public void testMoveAttachmentWithoutRemovePermission()

testMoveAttachmentToUnpermittedPage

public void testMoveAttachmentToUnpermittedPage()

testSortingByCreatedDate

public void testSortingByCreatedDate()
                              throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

testAttachmentAuthorshipPreservedOnAttachmentMoveAndComment

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

testAttachmentNamesNotTruncatedOnServerSide

public void testAttachmentNamesNotTruncatedOnServerSide()

testMissingAttachmentOnDrafts

public void testMissingAttachmentOnDrafts()


Copyright © 2003-2014 Atlassian. All Rights Reserved.