com.atlassian.confluence
Class AttachmentUploadAcceptanceTest

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.AttachmentUploadAcceptanceTest
All Implemented Interfaces:
junit.framework.Test

public class AttachmentUploadAcceptanceTest
extends AbstractConfluenceAcceptanceTest

Tests the action for uploading attachments directly from AJAX, etc.


Field Summary
 
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
AttachmentUploadAcceptanceTest()
           
 
Method Summary
 void testRenamePageForLinkInsideImage()
          This test was moved from its prior home of PageOperationsAcceptanceTest.
 void testUploadAttachmentGetsXssSafeContentDispositionApplicationXml()
           
 void testUploadAttachmentGetsXssSafeContentDispositionAtom()
           
 void testUploadAttachmentGetsXssSafeContentDispositionHtml()
           
 void testUploadAttachmentGetsXssSafeContentDispositionTextXml()
           
 void testUploadAttachmentKeepsProperContentTypeGif()
           
 void testUploadAttachmentKeepsProperContentTypeJpeg()
           
 void testUploadAttachmentKeepsProperContentTypePng()
           
 void testUploadAttachmentKeepsProperContentTypeTxt()
           
 void testUploadAttachmentOfficeXmlAsZipLikeIEDoesIt()
           
 void testUploadAttachmentOpenOfficeXmlAsZipLikeIEDoesIt()
           
 void testUploadAttachments()
           
 void testUploadAttachmentWithGenericContentTypeGetsFixed()
           
 void testUploadAttachmentWithGenericContentTypeGetsFixedXlsb()
           
 void testUploadAttachmentWithGenericContentTypeGetsFixedXlsm()
           
 void testUploadAttachmentWithInvalidTypeGetsFixed()
           
 void testUploadAttachmentZipFile()
           
 void testUrlEscapingWhenSpecialCharactersInFilename()
           
 void testValidationErrorWhenAttachmentTooLarge()
           
 void testValidationErrorWhenNotPermitted()
           
 void testValidationErrorWhenNotPermittedByInheritedPagePermissions()
           
 void testValidationErrorWhenNotPermittedOnPage()
           
 void testValidationErrorWhenTooManyAttachments()
           
 
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, setUp, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttachmentUploadAcceptanceTest

public AttachmentUploadAcceptanceTest()
Method Detail

testUploadAttachments

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

testUploadAttachmentWithInvalidTypeGetsFixed

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

testUploadAttachmentWithGenericContentTypeGetsFixed

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

testUploadAttachmentWithGenericContentTypeGetsFixedXlsm

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

testUploadAttachmentWithGenericContentTypeGetsFixedXlsb

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

testUploadAttachmentOfficeXmlAsZipLikeIEDoesIt

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

testUploadAttachmentOpenOfficeXmlAsZipLikeIEDoesIt

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

testUploadAttachmentZipFile

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

testUploadAttachmentKeepsProperContentTypeJpeg

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

testUploadAttachmentKeepsProperContentTypeGif

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

testUploadAttachmentKeepsProperContentTypePng

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

testUploadAttachmentKeepsProperContentTypeTxt

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

testUploadAttachmentGetsXssSafeContentDispositionHtml

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

testUploadAttachmentGetsXssSafeContentDispositionTextXml

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

testUploadAttachmentGetsXssSafeContentDispositionApplicationXml

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

testUploadAttachmentGetsXssSafeContentDispositionAtom

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

testRenamePageForLinkInsideImage

public void testRenamePageForLinkInsideImage()
                                      throws java.io.IOException,
                                             org.apache.xmlrpc.XmlRpcException
This test was moved from its prior home of PageOperationsAcceptanceTest. It needed some API to upload an image from the acceptance test classpath. This API is available in this test class but has not been made available yet to other classes. Making this reusable is beyond scope.

Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testValidationErrorWhenAttachmentTooLarge

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

testValidationErrorWhenNotPermitted

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

testValidationErrorWhenNotPermittedOnPage

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

testValidationErrorWhenNotPermittedByInheritedPagePermissions

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

testValidationErrorWhenTooManyAttachments

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

testUrlEscapingWhenSpecialCharactersInFilename

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


Copyright © 2003-2014 Atlassian. All Rights Reserved.