com.atlassian.renderer.wysiwyg
Class TestSimpleMarkup

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.renderer.wysiwyg.WysiwygTest
              extended by com.atlassian.renderer.wysiwyg.TestSimpleMarkup
All Implemented Interfaces:
junit.framework.Test

public class TestSimpleMarkup
extends WysiwygTest


Nested Class Summary
static class TestSimpleMarkup.FlagMask
           
 
Field Summary
 
Fields inherited from class com.atlassian.renderer.wysiwyg.WysiwygTest
macroManager
 
Constructor Summary
TestSimpleMarkup()
           
 
Method Summary
 void setUp()
           
protected  void tearDown()
           
 void testAddingTextBelowListInTable()
           
 void testAddMacroAfterTable()
           
 void testAnchorInHeading()
           
 void testAnchorLinks()
           
 void testApostrophe()
           
 void testBareTable()
          EDITLIVE-16: tables should work if they aren't surrounded by a
 void testBold()
           
 void testBQ()
           
 void testBrInList()
           
 void testBrInTableHTML()
           
 void testBulletedList()
           
 void testBulletsInsideTable()
           
 void testCodeHtml()
           
 void testCodeMacroInList()
           
 void testCodeWithWhitespace()
           
 void testColor()
           
 void testColorTagsInLink()
           
 void testColorTagsSurroundingLink()
           
 void testColourInTable()
           
 void testColoursAndLists()
           
 void testCombinations()
           
 void testComplexPanel()
          Simpler version of testJIRAReleasePlan that exposes problems with preserving whitespace
 void testCONF5044TrimmingNbspInTableCells()
           
 void testCONF5492()
           
 void testCONF5829WordTableImport()
           
 void testDecoratedLinks()
           
 void testEmoticons()
           
 void testEmoticonsNextToStyledText()
           
 void testEmoticonWithTextPutsWhiteSpace()
           
 void testEmptyCodeMacro()
           
 void testEmptyLinesInsideMacro()
           
 void testEmptyLinesInsideMacro2()
           
 void testEmptyLinesInsideMacroShort()
           
 void testEmptyLinesStay()
           
 void testEmptyMetadataMacro()
           
 void testEmptyPara()
           
 void testEntitiesPreserved()
           
 void testEscapedLinesInTable()
           
 void testEscapingAlreadyEscaped()
           
 void testExcerpt()
           
 void testExcerptInTable()
          CONF-4916
 void testExclamationMark()
           
 void testExtraSpaceCreation()
           
 void testForcedBreakAfterMacro()
           
 void testForcedNewlines()
           
 void testForcedNewlinesInTables()
           
 void testHeadings()
           
 void testHorizontalRuleBeforeMacro()
          CONF-8282 - test horizontal rule before macro
 void testHRWithFollowingThings()
           
 void testImageAfterMacro()
           
 void testImageAfterRule()
           
 void testImageAfterText()
           
 void testImageLink()
           
 void testImageParametersInLink()
           
 void testImageWithSizeParams()
          CONF-8445 - test that image size params are correctly parsed into markup
 void testInlineHTML()
           
 void testInsertRendersAsU()
           
 void testIntraWordStyles()
           
 void testIntraWordXHTML()
           
 void testInvalidLink()
           
 void testItalic()
           
 void testJIRAReleasePlan()
           
 void testJustEmptyLinesInsideMacro()
           
 void testLayoutMacros()
           
 void testLeadingSpacesOnFirstLineOfNoFormat()
           
 void testLineBreaks()
           
 void testLinkAfterList()
           
 void testLinkEditedInWysiwyg()
           
 void testLinkInMacro()
           
 void testLinks()
           
 void testLinksInNestedList()
           
 void testLinksWithSpecialCharactersInTooltipAndAlias()
           
 void testListHeadingList()
           
 void testLists()
           
 void testListsAndTables()
           
 void testListWithEmptyItem()
           
 void testMacro()
           
 void testMacroAfterPre()
           
 void testMacroAfterTable()
           
 void testMacroInHeading()
           
 void testMacroInTable()
           
 void testMacroInTable2()
           
 void testMailto()
           
 void testMarkupEscapes()
           
 void testMonoSpace()
           
 void testMoreExtraSpaceCreation()
           
 void testMoreListInTable()
           
 void testMultipleIntrawordStyles()
           
 void testNbspsAtEndOfLine()
           
 void testNestedLists()
           
 void testNestedListsHTML()
           
 void testNestedListsInTables()
           
 void testNestedListsInWikiSrcDivs()
           
 void testNewlinesArePreservedNearCodeMacro()
          Tests that newlines in and around the code macro are preserved.
 void testNewlinesArePreservedNearHtmlMacro()
          Tests that newlines in and around the html macro are preserved.
 void testNewlinesArePreservedNearPanelMacro()
           
 void testNewlinesArePreservedNearUnrecognisedMacro()
          Tests that newlines in and around an unknown macro are preserved.
 void testNewlinesAsWordSeperators()
           
 void testNewlinesInCode()
           
 void testNewlinesInLists()
           
 void testNewlyInsertedLinkAfterTable()
           
 void testNoformat()
           
 void testNoformatWithWhitespace()
           
 void testNoteAfterText()
           
 void testNumberedList()
           
 void testParagraphAfterHeading()
           
 void testParagraphBeforeMacro()
           
 void testParagraphsInCodeMacro()
          CONF-7985 - test that a code macro containing <p> tags correctly adds newlines
 void testPastedAnchors()
          Test that the anchor text is kept.
 void testPastedLink()
           
 void testPointlessNbsps()
           
 void testPreserveBlankLinesInCodeMacro()
           
 void testPreserveEscapeCharacters()
           
 void testPreTagInHtml()
           
 void testQuotedImageSizes()
           
 void testQuoteMacro()
           
 void testRadeoxMacroWithNoBody()
           
 void testRedundantAliasesArePreserved()
          Used to test markup that was destroyed in order to counter CONF-5496.
 void testShortcutLinks()
           
 void testStrikethrough()
           
 void testStylesInLink()
           
 void testTable()
           
 void testTableAfterList()
           
 void testTableXHTML()
          Test that we can handle some of the nastier HTML produced for nested lists by FCKeditor
 void testTextAfterList()
           
 void testTextAfterParagraph()
           
 void testTextFollowedByListInTableCell()
           
 void testTextInsertedIntoSpacerParagraph()
          CONF-14018 - if a spacer paragraph includes anything more than  , it's been edited by the user so we shouldn't ignore it.
 void testThumbnail()
           
 void testTwoLists()
          CONF-7333
 void testTwoTables()
           
 void testUnderline()
           
 void testUnknownMacrosPreserveLeadingAndTrailingNewlines()
           
 void testUnrecognisedMacroAfterBigGap()
           
 void testUnrecognisedMacroAfterHeadingAndBigGap()
           
 void testUrlWhichIsnt()
           
 void testYetAnotherTableThing()
           
 
Methods inherited from class com.atlassian.renderer.wysiwyg.WysiwygTest
getContext, getConverter, testByComparingXHTML, testFinalMarkupIsStable, testRoundtripFromWikiMarkup, testRoundtripFromWikiMarkup, testWikiMarkupToXhtml, testXHTML, testXhtmlToWikiMarkup, testXHTMLWithoutTestingMarkupStability
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, 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
 

Constructor Detail

TestSimpleMarkup

public TestSimpleMarkup()
Method Detail

testPreTagInHtml

public void testPreTagInHtml()

testInsertRendersAsU

public void testInsertRendersAsU()

testNewlyInsertedLinkAfterTable

public void testNewlyInsertedLinkAfterTable()

testLayoutMacros

public void testLayoutMacros()

testThumbnail

public void testThumbnail()

testMarkupEscapes

public void testMarkupEscapes()

testEntitiesPreserved

public void testEntitiesPreserved()

testNbspsAtEndOfLine

public void testNbspsAtEndOfLine()

testPointlessNbsps

public void testPointlessNbsps()

testLinkInMacro

public void testLinkInMacro()

testEmptyCodeMacro

public void testEmptyCodeMacro()

testEmptyMetadataMacro

public void testEmptyMetadataMacro()

testMacroInTable2

public void testMacroInTable2()

testEmptyLinesStay

public void testEmptyLinesStay()

testEmptyLinesInsideMacro

public void testEmptyLinesInsideMacro()

testEmptyLinesInsideMacro2

public void testEmptyLinesInsideMacro2()

testEmptyLinesInsideMacroShort

public void testEmptyLinesInsideMacroShort()

testJustEmptyLinesInsideMacro

public void testJustEmptyLinesInsideMacro()

testNewlinesArePreservedNearPanelMacro

public void testNewlinesArePreservedNearPanelMacro()

testNewlinesArePreservedNearCodeMacro

public void testNewlinesArePreservedNearCodeMacro()
Tests that newlines in and around the code macro are preserved. The code macro is vaguely understood by the wysiwyg editor, and falls into "case 3". The code block is rendered and a single div is wrapped around it by the convertor.


testNewlinesArePreservedNearHtmlMacro

public void testNewlinesArePreservedNearHtmlMacro()
Tests that newlines in and around the html macro are preserved. The html macro is not understood by the wysiwyg editor, and falls into "case 2" (although it also fulfils the requirements of case 1). The content is left alone (which means the html is actually not escaped atm). A div is wrapped around both the start and end tags.


testNewlinesArePreservedNearUnrecognisedMacro

public void testNewlinesArePreservedNearUnrecognisedMacro()
Tests that newlines in and around an unknown macro are preserved. Since the macro doesn't exist this falls into "case 1". The content is left alone. A div is wrapped around the whole block, and contains information about the start tag. The end tag is written straight out as text.


testUnrecognisedMacroAfterHeadingAndBigGap

public void testUnrecognisedMacroAfterHeadingAndBigGap()

testUnrecognisedMacroAfterBigGap

public void testUnrecognisedMacroAfterBigGap()

testParagraphAfterHeading

public void testParagraphAfterHeading()

testComplexPanel

public void testComplexPanel()
Simpler version of testJIRAReleasePlan that exposes problems with preserving whitespace


testTextAfterParagraph

public void testTextAfterParagraph()

testJIRAReleasePlan

public void testJIRAReleasePlan()

testMacroAfterPre

public void testMacroAfterPre()

testImageAfterMacro

public void testImageAfterMacro()

testCodeHtml

public void testCodeHtml()

testCodeWithWhitespace

public void testCodeWithWhitespace()

testNoformat

public void testNoformat()

testNoformatWithWhitespace

public void testNoformatWithWhitespace()

testLinkAfterList

public void testLinkAfterList()

testExclamationMark

public void testExclamationMark()

testForcedBreakAfterMacro

public void testForcedBreakAfterMacro()

testEscapedLinesInTable

public void testEscapedLinesInTable()

testApostrophe

public void testApostrophe()

testPreserveEscapeCharacters

public void testPreserveEscapeCharacters()

testPreserveBlankLinesInCodeMacro

public void testPreserveBlankLinesInCodeMacro()

testMonoSpace

public void testMonoSpace()

testBQ

public void testBQ()

testQuoteMacro

public void testQuoteMacro()

testListHeadingList

public void testListHeadingList()

testAnchorInHeading

public void testAnchorInHeading()

testForcedNewlines

public void testForcedNewlines()

testAddMacroAfterTable

public void testAddMacroAfterTable()

testTwoTables

public void testTwoTables()

testMacroAfterTable

public void testMacroAfterTable()

testEmoticonsNextToStyledText

public void testEmoticonsNextToStyledText()

testColourInTable

public void testColourInTable()

testColor

public void testColor()

testTextFollowedByListInTableCell

public void testTextFollowedByListInTableCell()

testParagraphBeforeMacro

public void testParagraphBeforeMacro()

testNestedLists

public void testNestedLists()

testLinks

public void testLinks()

testPastedLink

public void testPastedLink()

testPastedAnchors

public void testPastedAnchors()
Test that the anchor text is kept. Note, this test is for the existing behaviour where the anchor is not preserved. Having the anchor turned into an {anchor} macro would be better.


testHeadings

public void testHeadings()

testLineBreaks

public void testLineBreaks()

testImageLink

public void testImageLink()

testBold

public void testBold()

testItalic

public void testItalic()

testStrikethrough

public void testStrikethrough()

testUnderline

public void testUnderline()

testCombinations

public void testCombinations()

testNumberedList

public void testNumberedList()

testBulletedList

public void testBulletedList()

testTable

public void testTable()

testForcedNewlinesInTables

public void testForcedNewlinesInTables()

testMacro

public void testMacro()

testTextAfterList

public void testTextAfterList()

testListsAndTables

public void testListsAndTables()

testUnknownMacrosPreserveLeadingAndTrailingNewlines

public void testUnknownMacrosPreserveLeadingAndTrailingNewlines()

testTableXHTML

public void testTableXHTML()
Test that we can handle some of the nastier HTML produced for nested lists by FCKeditor


testEmoticons

public void testEmoticons()

testEmoticonWithTextPutsWhiteSpace

public void testEmoticonWithTextPutsWhiteSpace()

testNewlinesInLists

public void testNewlinesInLists()

testMacroInHeading

public void testMacroInHeading()

testCodeMacroInList

public void testCodeMacroInList()

testMacroInTable

public void testMacroInTable()

testNoteAfterText

public void testNoteAfterText()

testTableAfterList

public void testTableAfterList()

testIntraWordStyles

public void testIntraWordStyles()

testMultipleIntrawordStyles

public void testMultipleIntrawordStyles()

testIntraWordXHTML

public void testIntraWordXHTML()

testLinksWithSpecialCharactersInTooltipAndAlias

public void testLinksWithSpecialCharactersInTooltipAndAlias()

testDecoratedLinks

public void testDecoratedLinks()

testStylesInLink

public void testStylesInLink()

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class WysiwygTest
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
java.lang.Exception

testExcerptInTable

public void testExcerptInTable()
CONF-4916


testExcerpt

public void testExcerpt()

testNewlinesAsWordSeperators

public void testNewlinesAsWordSeperators()

testImageAfterRule

public void testImageAfterRule()

testColorTagsInLink

public void testColorTagsInLink()

testColorTagsSurroundingLink

public void testColorTagsSurroundingLink()

testLinkEditedInWysiwyg

public void testLinkEditedInWysiwyg()

testLinksInNestedList

public void testLinksInNestedList()

testInlineHTML

public void testInlineHTML()

testBrInTableHTML

public void testBrInTableHTML()

testHRWithFollowingThings

public void testHRWithFollowingThings()

testEscapingAlreadyEscaped

public void testEscapingAlreadyEscaped()

testMailto

public void testMailto()

testListWithEmptyItem

public void testListWithEmptyItem()

testMoreListInTable

public void testMoreListInTable()

testRadeoxMacroWithNoBody

public void testRadeoxMacroWithNoBody()

testUrlWhichIsnt

public void testUrlWhichIsnt()

testAnchorLinks

public void testAnchorLinks()

testBrInList

public void testBrInList()

testExtraSpaceCreation

public void testExtraSpaceCreation()

testMoreExtraSpaceCreation

public void testMoreExtraSpaceCreation()

testCONF5492

public void testCONF5492()

testCONF5044TrimmingNbspInTableCells

public void testCONF5044TrimmingNbspInTableCells()

testCONF5829WordTableImport

public void testCONF5829WordTableImport()

testYetAnotherTableThing

public void testYetAnotherTableThing()

testColoursAndLists

public void testColoursAndLists()

testImageParametersInLink

public void testImageParametersInLink()

testQuotedImageSizes

public void testQuotedImageSizes()

testBulletsInsideTable

public void testBulletsInsideTable()

testLeadingSpacesOnFirstLineOfNoFormat

public void testLeadingSpacesOnFirstLineOfNoFormat()

testRedundantAliasesArePreserved

public void testRedundantAliasesArePreserved()
Used to test markup that was destroyed in order to counter CONF-5496. We have changed the solution to that bug now so that the markup can be preserved.


testImageAfterText

public void testImageAfterText()

testNestedListsInTables

public void testNestedListsInTables()

testNestedListsInWikiSrcDivs

public void testNestedListsInWikiSrcDivs()

testNestedListsHTML

public void testNestedListsHTML()

testLists

public void testLists()

testInvalidLink

public void testInvalidLink()

testEmptyPara

public void testEmptyPara()

testShortcutLinks

public void testShortcutLinks()

testNewlinesInCode

public void testNewlinesInCode()

testAddingTextBelowListInTable

public void testAddingTextBelowListInTable()

testBareTable

public void testBareTable()
EDITLIVE-16: tables should work if they aren't surrounded by a


testTwoLists

public void testTwoLists()
CONF-7333


testHorizontalRuleBeforeMacro

public void testHorizontalRuleBeforeMacro()
CONF-8282 - test horizontal rule before macro


testParagraphsInCodeMacro

public void testParagraphsInCodeMacro()
CONF-7985 - test that a code macro containing <p> tags correctly adds newlines


testImageWithSizeParams

public void testImageWithSizeParams()
CONF-8445 - test that image size params are correctly parsed into markup


testTextInsertedIntoSpacerParagraph

public void testTextInsertedIntoSpacerParagraph()
CONF-14018 - if a spacer paragraph includes anything more than  , it's been edited by the user so we shouldn't ignore it.



Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.