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 String PROPERTIES_LINK_TEXT
           
 
Fields inherited from class com.atlassian.confluence.AbstractConfluenceAcceptanceTest
DASHBOARD_RECENT_UPDATES_URL, logAdjuster, 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 testAttachmentRangeRequest()
           
 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, baseUrlSelector, createSpaceViaWebUI, createTestSpaceViaWebUI, createTestUser, darkFeatures, directoryConfig, generateFile, getAppContext, getBaseUrl, getConfiguredBaseUrl, getPluginHelper, getServerStateManager, goToBlogCollector, logins, logout, pages, plugins, rebuildIndex, setUpTestNG, substituteForNodeBaseUrl, 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 String PROPERTIES_LINK_TEXT
See Also:
Constant Field Values
Constructor Detail

AttachmentAcceptanceTest

public AttachmentAcceptanceTest()
Method Detail

setUp

protected void setUp()
              throws 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:
Exception - from super

testAttachmentProperlyAttributedOnDashboard

public void testAttachmentProperlyAttributedOnDashboard()
                                                 throws Exception
Throws:
Exception

testAttachmentIconDisplayedAsPageMetaData

public void testAttachmentIconDisplayedAsPageMetaData()
                                               throws Exception
Throws:
Exception

testAddAttachmentWithCaptchaEnabledAndWrongCaptcha

public void testAddAttachmentWithCaptchaEnabledAndWrongCaptcha()

testMaxAttachmentSizeRespected

public void testMaxAttachmentSizeRespected()

testMaxAttachmentsInUI

public void testMaxAttachmentsInUI()

testAttachMultipleFiles

public void testAttachMultipleFiles()

testAttachmentPagination

public void testAttachmentPagination()
                              throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

testHighlightAttachmentWithPagination

public void testHighlightAttachmentWithPagination()
                                           throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

testAttachFileWithSpecialCharacters

public void testAttachFileWithSpecialCharacters()

testFilenameWithSpaceIsPercentEncoded

public void testFilenameWithSpaceIsPercentEncoded()

testV1andV2AttachmentUrls

public void testV1andV2AttachmentUrls()

testDownloadFilesWithPlusSignsAndSpaces

public void testDownloadFilesWithPlusSignsAndSpaces()
                                             throws IOException
Throws:
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 Exception
Throws:
Exception

testDownloadAllAttachmentsOnPageLink

public void testDownloadAllAttachmentsOnPageLink()
                                          throws IOException,
                                                 SAXException
Throws:
IOException
SAXException

testDownloadSingleAttachment

public void testDownloadSingleAttachment()
                                  throws SAXException,
                                         IOException
Throws:
SAXException
IOException

testDownloadAllAttachments

public void testDownloadAllAttachments()

testDownloadAllAttachmentsAsAnonymousUser

public void testDownloadAllAttachmentsAsAnonymousUser()
                                               throws Exception
Throws:
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 Exception
Test of CONF-9007, that when an attachment is moved, links to it are updated.

Throws:
Exception

testMovingAttachmentSimplifiesLinksInNewOwner

public void testMovingAttachmentSimplifiesLinksInNewOwner()
                                                   throws 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:
Exception

testMovingAttachmentUpdatesLinksWithPagePrefix

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

Throws:
Exception

testMovingAttachmentDoesNotUpdateLinksWithoutAttachments

public void testMovingAttachmentDoesNotUpdateLinksWithoutAttachments()
                                                              throws Exception
Throws:
Exception

testMovingAttachmentDoesNotBreakLinkToOtherAttachmentsWithSameName

public void testMovingAttachmentDoesNotBreakLinkToOtherAttachmentsWithSameName()
                                                                        throws 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:
Exception

testLargeAttachmentNotTruncated

public void testLargeAttachmentNotTruncated()
                                     throws Exception
Throws:
Exception

testHtmlAttachmentsAreNotServedInline

public void testHtmlAttachmentsAreNotServedInline()

testAttachmentVersioning

public void testAttachmentVersioning()
                              throws IOException,
                                     SAXException
Throws:
IOException
SAXException

testAttachmentRangeRequest

public void testAttachmentRangeRequest()
                                throws IOException
Throws:
IOException

testInvalidDownloadUrlReturnsFourOhFour

public void testInvalidDownloadUrlReturnsFourOhFour()
                                             throws Exception
Throws:
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 UnsupportedEncodingException
Throws:
UnsupportedEncodingException

testAttachmentAuthorshipPreservedOnAttachmentMoveAndComment

public void testAttachmentAuthorshipPreservedOnAttachmentMoveAndComment()
                                                                 throws Exception
Throws:
Exception

testAttachmentNamesNotTruncatedOnServerSide

public void testAttachmentNamesNotTruncatedOnServerSide()

testMissingAttachmentOnDrafts

public void testMissingAttachmentOnDrafts()


Copyright © 2003–2015 Atlassian. All rights reserved.