FakeField
Summary
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.
Constructor
FakeField
Syntax
FakeField
(
-
conf
Summary
Parameters:
-
conf
ObjectA field configuration object
Example:
var Field = require('@openveo/test').e2e.fields.Field;
var myFakeField = Field.get({
type: 'fake',
name: 'My field',
baseElement: element(by.css('form'))
});
Item Index
Methods
Properties
Methods
clear
Syntax
Summary
Clears field value.
Does not do anything as this is not a real field.
Returns:
Promise:
Promise resolving immediately
getDescription
Syntax
Summary
Gets field description.Returns:
Promise:
Promise resolving with the description
Example:
myField.getDescription().then(function(description) {
console.log('Field description is : ' + description);
});
getElement
Syntax
Summary
Gets field element wrapper. Look for a form element label and return its parent.Returns:
Promise:
Promise resolving with the element
getErrorMessage
Syntax
Summary
Gets field error message.Returns:
Promise:
Promise resolving with the error message
Example:
myField.getErrorMessage().then(function(errorMessage) {
console.log('Error message : ' + errorMessage);
});
getLabel
Syntax
Summary
Gets field label.Returns:
Promise:
Promise resolving with the label
Example:
myField.getLabel().then(function(label) {
console.log('Field label is : ' + label);
});
getText
Syntax
Summary
Gets field text representation in case of an inline editable field.Returns:
Promise:
Promise resolving with field text representation
Example:
myField.getText().then(function(text) {
console.log(text);
});
getValue
Syntax
Summary
Gets fake field text.
Returns:
Promise:
Promise resolving with field text
Example:
myField.getValue().then(function(value) {
console.log('Got text: ' + value);
});
isOnError
Syntax
Summary
Tests if a field is considered as on error.
Does not do anything as this is not a real field.
Returns:
Promise:
Promise resolving with false as it is not a real field, it couldn't be in error