org.xwiki.appwithinminutes.test.po
Class ClassFieldEditPane

java.lang.Object
  extended by org.xwiki.test.ui.po.BaseElement
      extended by org.xwiki.appwithinminutes.test.po.ClassFieldEditPane
Direct Known Subclasses:
DateClassFieldEditPane, LongTextClassFieldEditPane, StaticListClassFieldEditPane

public class ClassFieldEditPane
extends BaseElement

Represents the pane used to edit a class field.

Since:
4.2M1
Version:
$Id: fdf68b24c0c3a3644d4327147ed40868720a88f0 $

Constructor Summary
ClassFieldEditPane(String fieldName)
          Creates a new instance that can be used to edit the specified class field.
 
Method Summary
 void closeConfigPanel()
          Closes the field configuration panel.
 ConfirmationBox delete()
          Clicks on the delete field icon.
 void dragTo(org.openqa.selenium.WebElement element, int xOffset, int yOffset)
          Drag this field over the specified element.
protected  org.openqa.selenium.WebElement getContainer()
           
 String getDefaultValue()
           
protected  org.openqa.selenium.WebElement getDefaultValueInput()
           
protected  String getFieldName()
          Do not mistaken this with getName().
 String getName()
           
protected  org.openqa.selenium.WebElement getPropertyInput(String propertyName)
           
 void openConfigPanel()
          Opens the field configuration panel.
 void setDefaultValue(String defaultValue)
          Sets the field default value
 void setName(String fieldName)
          Sets the field name
 void setPrettyName(String prettyName)
          Sets the field pretty name.
 
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

ClassFieldEditPane

public ClassFieldEditPane(String fieldName)
Creates a new instance that can be used to edit the specified class field.

Parameters:
fieldName - the field name
Method Detail

setPrettyName

public void setPrettyName(String prettyName)
Sets the field pretty name.

Parameters:
prettyName - the new field pretty name

setDefaultValue

public void setDefaultValue(String defaultValue)
Sets the field default value

Parameters:
defaultValue - the new field default value

getDefaultValue

public String getDefaultValue()
Returns:
the default value of this field

getDefaultValueInput

protected org.openqa.selenium.WebElement getDefaultValueInput()
Returns:
the element used to input the default field value

openConfigPanel

public void openConfigPanel()
Opens the field configuration panel.


closeConfigPanel

public void closeConfigPanel()
Closes the field configuration panel.


setName

public void setName(String fieldName)
Sets the field name

Parameters:
fieldName - the new field name

getName

public String getName()
Returns:
the current value of the 'name' field meta property

getPropertyInput

protected org.openqa.selenium.WebElement getPropertyInput(String propertyName)
Parameters:
propertyName - the name of a class field meta property
Returns:
the form input used to edit the value of the specified meta property

delete

public ConfirmationBox delete()
Clicks on the delete field icon.

Returns:
the confirmation box to confirm the field delete

dragTo

public void dragTo(org.openqa.selenium.WebElement element,
                   int xOffset,
                   int yOffset)
Drag this field over the specified element. Use this method to reorder class fields.

Parameters:
element - the element to drag this field to
xOffset - offset from the top-left corner of the given element; a negative value means coordinates right from the given element
yOffset - offset from the top-left corner of the given element; a negative value means coordinates above the given element

getContainer

protected org.openqa.selenium.WebElement getContainer()
Returns:
the element that wraps the class field edit pane

getFieldName

protected String getFieldName()
Do not mistaken this with getName().

Returns:
the name of the edited field


Copyright © 2004-2013 XWiki. All Rights Reserved.