com.atlassian.confluence.selenium
Class AbstractEditorAutocompleteTester

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.AbstractEditorAutocompleteTester
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
EditorAutocompleteLinkShortcutTest, EditorAutocompleteMediaShortcutTest

public abstract class AbstractEditorAutocompleteTester
extends AbstractSeleniumTest

Tests Autocomplete dropdown in the RTE. Default suggestions and "quicknav" are tested based on a trigger character and test data defined in the subclass.


Field Summary
protected  User defaultUser
           
protected  Editor editor
           
protected  EditorAutocomplete editorAutocomplete
           
protected  boolean isAttachment
           
protected  boolean isComment
           
protected  boolean isCreatePage
           
protected  java.lang.String searchText
           
protected  TinyMce.ShortCut shortCut
           
protected  TitledContent testContent
           
protected  TinyMce tinyMce
           
 
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
AbstractEditorAutocompleteTester()
           
 
Method Summary
protected abstract  void assertInsertedInRTE()
           
protected abstract  void assertInView()
           
protected  void autocompleteSearchAndSelect()
           
protected  void runAutocomplete()
           
protected  void setAndSelectText(java.lang.String searchText)
          Wraps a selectable element around the supplied text and then selects the element.
protected  void setUp()
           
protected abstract  void setupWhenTestTypeKnown(long contentId, boolean isSearch)
           
protected  void tearDown()
           
 void testInsertFromSearchResultWhenCreatingBlogPost()
           
 void testInsertFromSearchResultWhenCreatingComment()
           
 void testInsertFromSearchResultWhenCreatingPage()
           
 void testInsertFromSearchResultWhenEditingBlogPost()
           
 void testInsertFromSearchResultWhenEditingComment()
           
 void testInsertFromSearchResultWhenEditingPage()
           
 void testInsertFromSuggestionWhenCreatingBlogPost()
           
 void testInsertFromSuggestionWhenCreatingComment()
           
 void testInsertFromSuggestionWhenCreatingPage()
           
 void testInsertFromSuggestionWhenEditingBlogPost()
           
 void testInsertFromSuggestionWhenEditingComment()
           
 void testInsertFromSuggestionWhenEditingPage()
           
protected  EditorAutocomplete triggerWithShortcut()
           
 
Methods inherited from class com.atlassian.confluence.selenium.AbstractSeleniumTest
captureScreenShot, createTestData, runTest, setAjsLogRendered, setAjsLogVisible
 
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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

editor

protected Editor editor

defaultUser

protected User defaultUser

tinyMce

protected TinyMce tinyMce

editorAutocomplete

protected EditorAutocomplete editorAutocomplete

isComment

protected boolean isComment

isAttachment

protected boolean isAttachment

isCreatePage

protected boolean isCreatePage

testContent

protected TitledContent testContent

shortCut

protected TinyMce.ShortCut shortCut

searchText

protected java.lang.String searchText
Constructor Detail

AbstractEditorAutocompleteTester

public AbstractEditorAutocompleteTester()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class AbstractSeleniumTest
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class AbstractSeleniumTest
Throws:
java.lang.Exception

testInsertFromSuggestionWhenCreatingPage

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

testInsertFromSuggestionWhenEditingPage

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

testInsertFromSuggestionWhenCreatingBlogPost

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

testInsertFromSuggestionWhenEditingBlogPost

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

testInsertFromSuggestionWhenCreatingComment

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

testInsertFromSuggestionWhenEditingComment

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

testInsertFromSearchResultWhenCreatingPage

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

testInsertFromSearchResultWhenEditingPage

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

testInsertFromSearchResultWhenCreatingBlogPost

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

testInsertFromSearchResultWhenEditingBlogPost

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

testInsertFromSearchResultWhenCreatingComment

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

testInsertFromSearchResultWhenEditingComment

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

runAutocomplete

protected void runAutocomplete()

autocompleteSearchAndSelect

protected void autocompleteSearchAndSelect()

setAndSelectText

protected void setAndSelectText(java.lang.String searchText)
Wraps a selectable element around the supplied text and then selects the element.


triggerWithShortcut

protected EditorAutocomplete triggerWithShortcut()

setupWhenTestTypeKnown

protected abstract void setupWhenTestTypeKnown(long contentId,
                                               boolean isSearch)

assertInsertedInRTE

protected abstract void assertInsertedInRTE()

assertInView

protected abstract void assertInView()


Copyright © 2003-2013 Atlassian. All Rights Reserved.