org.xwiki.test.ui.po
Class EntityTreeElement

java.lang.Object
  extended by org.xwiki.test.ui.po.BaseElement
      extended by org.xwiki.test.ui.po.EntityTreeElement

public class EntityTreeElement
extends BaseElement

Represents the actions possible on the XWiki Explorer Tree.

Since:
5.1M1
Version:
$Id: 4bc9795b4168fdb0b26f2d6a25d4414147d1603d $

Constructor Summary
EntityTreeElement()
           
 
Method Summary
 boolean hasAttachment(String spaceName, String pageName, String fileName)
           
 boolean hasPage(String spaceName, String pageName)
           
 boolean hasPage(String spaceName, String pageName, String pageTitle)
           
 boolean hasSpace(String spaceName)
           
 void lookupEntity(String entityReference)
          Types the given text in the input box below the tree.
 EntityTreeElement waitForAttachment(String spaceName, String pageName, String fileName)
          Waits for the node corresponding to the specified attachments to be present but not selected.
 EntityTreeElement waitForAttachment(String spaceName, String pageName, String fileName, boolean selected)
          Waits for the node corresponding to the specified attachment to be present.
 EntityTreeElement waitForPage(String spaceName, String pageName)
          Waits for the node corresponding to the specified page to be present but not selected.
 EntityTreeElement waitForPage(String spaceName, String pageName, boolean selected)
          Waits for the node corresponding to the specified page to be present.
 EntityTreeElement waitForPage(String spaceName, String pageName, String pageTitle)
          Waits for the node corresponding to the specified page to be present but not selected.
 EntityTreeElement waitForPage(String spaceName, String pageName, String pageTitle, boolean selected)
          Waits for the node corresponding to the specified page to be present.
 EntityTreeElement waitForSpace(String spaceName)
          Waits for the node corresponding to the specified space to be present but not selected.
 EntityTreeElement waitForSpace(String spaceName, boolean selected)
          Waits for the node corresponding to the specified space to be present.
 
Methods inherited from class org.xwiki.test.ui.po.BaseElement
executeJavascript, getDriver, getUtil, makeAlertDialogSilent, makeConfirmDialogSilent, makeElementVisible, makeElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilElementDisappears, waitUntilElementEndsWithAttributeValue, waitUntilElementHasAttributeValue, waitUntilElementHasTextContent, waitUntilElementIsVisible, waitUntilElementsAreVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityTreeElement

public EntityTreeElement()
Method Detail

waitForSpace

public EntityTreeElement waitForSpace(String spaceName)
Waits for the node corresponding to the specified space to be present but not selected.

Parameters:
spaceName - the space name
Returns:
this

waitForSpace

public EntityTreeElement waitForSpace(String spaceName,
                                      boolean selected)
Waits for the node corresponding to the specified space to be present.

Parameters:
spaceName - the space name
selected - true if the space node should be selected, false otherwise
Returns:
this

hasSpace

public boolean hasSpace(String spaceName)
Parameters:
spaceName - the space name
Returns:
true if the node corresponding to the specified space is present (selected or not), false otherwise

waitForPage

public EntityTreeElement waitForPage(String spaceName,
                                     String pageName)
Waits for the node corresponding to the specified page to be present but not selected. We assume the page title equals the page name.

Parameters:
spaceName - the space containing the page
pageName - the page name
Returns:
this

waitForPage

public EntityTreeElement waitForPage(String spaceName,
                                     String pageName,
                                     String pageTitle)
Waits for the node corresponding to the specified page to be present but not selected.

Parameters:
spaceName - the space containing the page
pageName - the page name (used as the node tool tip)
pageTitle - the page title (used as the node label)
Returns:
this

waitForPage

public EntityTreeElement waitForPage(String spaceName,
                                     String pageName,
                                     boolean selected)
Waits for the node corresponding to the specified page to be present. We assume the page title equals the page name.

Parameters:
spaceName - the space containing the page
pageName - the page name
selected - true if the page node should be selected, false otherwise
Returns:
this

waitForPage

public EntityTreeElement waitForPage(String spaceName,
                                     String pageName,
                                     String pageTitle,
                                     boolean selected)
Waits for the node corresponding to the specified page to be present.

Parameters:
spaceName - the space containing the page
pageName - the page name (used as the node hint)
pageTitle - the page title (used as the node label)
selected - true if the page node should be selected, false otherwise
Returns:
this

hasPage

public boolean hasPage(String spaceName,
                       String pageName)
Parameters:
spaceName - the space containing the page
pageName - the page name
Returns:
true if the specified page node is present, selected or not, false otherwise; we assume the page title equals the page name

hasPage

public boolean hasPage(String spaceName,
                       String pageName,
                       String pageTitle)
Parameters:
spaceName - the space containing the page
pageName - the page name (used as the node hint)
pageTitle - the page title (used as the node label)
Returns:
true if the specified page node is present, selected or not, false otherwise

waitForAttachment

public EntityTreeElement waitForAttachment(String spaceName,
                                           String pageName,
                                           String fileName)
Waits for the node corresponding to the specified attachments to be present but not selected.

Parameters:
spaceName - the space containing the page
pageName - the page that holds the attachment
fileName - the attachment file name
Returns:
this

waitForAttachment

public EntityTreeElement waitForAttachment(String spaceName,
                                           String pageName,
                                           String fileName,
                                           boolean selected)
Waits for the node corresponding to the specified attachment to be present.

Parameters:
spaceName - the space containing the page
pageName - the page that holds the attachment
fileName - the attachment file name
selected - true if the attachment node should be selected, false otherwise
Returns:
this

hasAttachment

public boolean hasAttachment(String spaceName,
                             String pageName,
                             String fileName)
Parameters:
spaceName - the space containing the page
pageName - the page that holds the attachment
fileName - the attachment file name
Returns:
true if the specified attachment node is present, selected or not, false otherwise

lookupEntity

public void lookupEntity(String entityReference)
Types the given text in the input box below the tree. As a result the tree will lookup an entity among its nodes (e.g. page, attachment) that matches the given reference.

Parameters:
entityReference - the text to be typed in the input box below the tree, usually an entity reference


Copyright © 2004-2013 XWiki. All Rights Reserved.