Class ClassFieldEditPane
- java.lang.Object
-
- org.xwiki.test.ui.po.BaseElement
-
- org.xwiki.appwithinminutes.test.po.ClassFieldEditPane
-
- Direct Known Subclasses:
DateClassFieldEditPane
,LongTextClassFieldEditPane
,SuggestClassFieldEditPane
public class ClassFieldEditPane extends BaseElement
Represents the pane used to edit a class field.- Since:
- 4.2M1
- Version:
- $Id: 881c4fafc0a7576f35a79a4f42564510666129fe $
-
-
Constructor Summary
Constructors Constructor Description ClassFieldEditPane(String fieldName)
Creates a new instance that can be used to edit the specified class field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 withgetName()
.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 valuevoid
setName(String fieldName)
Sets the field namevoid
setPrettyName(String prettyName)
Sets the field pretty name.-
Methods inherited from class org.xwiki.test.ui.po.BaseElement
getDriver, getUtil, isElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationInProgressMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilPageIsReady
-
-
-
-
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 toxOffset
- offset from the top-left corner of the given element; a negative value means coordinates right from the given elementyOffset
- 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
-
-