Constructor
new FakeField(conf)
Defines a form fake field.
FakeField is not really a field, it is just a simple text with a label.
Use Field.get method to get an instance of FakeField.
Parameters:
| Name | Type | Description | 
|---|---|---|
| conf | Object | A field configuration object | 
- Source:
Example
var Field = require('@openveo/test').e2e.fields.Field;
var myFakeField = Field.get({
  type: 'fake',
  name: 'My field',
  baseElement: element(by.css('form'))
});Extends
Members
(readonly) baseElement :Object
Element from where to look for the field (typically the form element).
Type:
- Object
- Inherited From:
- Source:
(readonly) name :String
Field label.
Type:
- String
- Inherited From:
- Source:
Methods
clear() → {Promise}
Clears field value.
Does not do anything as this is not a real field.
- Overrides:
- Source:
Returns:
Promise resolving immediately
- Type
- Promise
getDescription() → {Promise}
Gets field description.
- Inherited From:
- Source:
Returns:
Promise resolving with the description
- Type
- Promise
Example
myField.getDescription().then(function(description) {
  console.log('Field description is : ' + description);
});getElement() → {Promise}
Gets field element wrapper.
Look for a form element label and return its parent.
- Inherited From:
- Source:
Returns:
Promise resolving with the element
- Type
- Promise
getErrorMessage() → {Promise}
Gets field error message.
- Inherited From:
- Source:
Returns:
Promise resolving with the error message
- Type
- Promise
Example
myField.getErrorMessage().then(function(errorMessage) {
  console.log('Error message : ' + errorMessage);
});getLabel() → {Promise}
Gets field label.
- Inherited From:
- Source:
Returns:
Promise resolving with the label
- Type
- Promise
Example
myField.getLabel().then(function(label) {
  console.log('Field label is : ' + label);
});getText() → {Promise}
Gets field text representation in case of an inline editable field.
- Inherited From:
- Source:
Returns:
Promise resolving with field text representation
- Type
- Promise
Example
myField.getText().then(function(text) {
  console.log(text);
});getValue() → {Promise}
Gets fake field text.
- Overrides:
- Source:
Returns:
Promise resolving with field text
- Type
- Promise
Example
myField.getValue().then(function(value) {
  console.log('Got text: ' + value);
});isOnError() → {Promise}
Tests if a field is considered as on error.
Does not do anything as this is not a real field.
- Overrides:
- Source:
Returns:
Promise resolving with false as it is not a real field, it couldn't be in error
- Type
- Promise
setValue(valueopt) → {Promise}
Sets field value.
Does not do anything as this is not a real field.
Parameters:
| Name | Type | Attributes | Default | Description | 
|---|---|---|---|---|
| value | String | <optional> | '' | Field's value | 
- Overrides:
- Source:
Returns:
Promise resolving immediately
- Type
- Promise