OpenVeo test API

API Docs for: 8.0.0
Show:

MatchTagsField

Extends TagsField
Module: e2e

Summary

Defines a MatchTagsField.

A MatchTagsField is a field part of a match, it is pretty much like a TagsField except that it is part of a match.

Constructor

MatchTagsField

Syntax

MatchTagsField

(
  • conf
)

Summary

Parameters:

  • conf Object

    Field configuration

    • name String

      Field configuration

    • baseElement ElementFinder

      The match element

Methods

addMatchValue

Syntax

addMatchValue

() Promise private

Summary

Adds a new match using add button, text field and tags field.

Returns:

Promise:

Promise resolving when match has been added

addMatchValueUsingAutoCompletion

Syntax

addMatchValueUsingAutoCompletion

() Promise private

Summary

Adds a new match using add button, text field and tags field with auto completion.

Returns:

Promise:

Promise resolving when match has been added

clear

Inherited from Field but overwritten in lib/e2e/fields/MatchField.js:332

Syntax

clear

() Promise

Summary

Clears field value by removing all tags.

Returns:

Promise:

Promise resolving when the field is cleared

Example:

myField.clear().then(function() {
  console.log('Field cleared');
});

getAddLabel

Syntax

getAddLabel

() Promise

Summary

Gets the add button label.

Returns:

Promise:

Promise resolving with the button label

Example:

myField.getAddLabel().then(function(label) {
  console.log('Add button label: ' + label);
});

getDescription

Syntax

getDescription

() Promise

Summary

Gets field description.

Returns:

Promise:

Promise resolving with the description

Example:

myField.getDescription().then(function(description) {
  console.log('Field description is : ' + description);
});

getElement

Inherited from Field but overwritten in lib/e2e/fields/MatchField.js:98

Syntax

getElement

() Promise

Summary

Gets match tags field element wrapper.

Returns:

Promise:

Promise resolving with the element

getErrorMessage

Syntax

getErrorMessage

() Promise

Summary

Gets field error message.

Returns:

Promise:

Promise resolving with the error message

Example:

myField.getErrorMessage().then(function(errorMessage) {
  console.log('Error message : ' + errorMessage);
});

getInputPlaceholder

Syntax

getInputPlaceholder

() Promise

Summary

Gets the input placeholder.

Returns:

Promise:

Promise resolving with the input placeholder

Example:

myField.getInputPlaceholder().then(function(placeholder) {
  console.log('Input placeholder: ' + placeholder);
});

getLabel

Syntax

getLabel

() Promise

Summary

Gets field label.

Returns:

Promise:

Promise resolving with the label

Example:

myField.getLabel().then(function(label) {
  console.log('Field label is : ' + label);
});

getMatchValue

Syntax

getMatchValue

() Promise private

Summary

Gets value of a match.

Returns:

Promise:

Promise resolving with the value of the match

getTagsPlaceholder

Syntax

getTagsPlaceholder

() Promise

Summary

Gets the tags placeholder.

Returns:

Promise:

Promise resolving with the tags placeholder

Example:

myField.getTagsPlaceholder().then(function(placeholder) {
  console.log('Tags placeholder: ' + placeholder);
});

getText

Syntax

getText

() Promise

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

Inherited from Field but overwritten in lib/e2e/fields/MatchField.js:221

Syntax

getValue

() Promise

Summary

Gets field value, the list of associations (matches).

Returns:

Promise:

Promise resolving with the list of matches

Example:

myField.getValue().then(function(matches) {
  console.log(matches);
});

isOnError

Inherited from Field but overwritten in lib/e2e/fields/MatchField.js:363

Syntax

isOnError

() Promise

Summary

Tests if field is considered as on error.

Returns:

Promise:

Promise resolving with a boolean indicating if the field is on error

Example:

myField.isOnError().then(function(isOnError) {
  console.log('Is field on error ? ' + isOnError);
});

removeMatch

Syntax

removeMatch

() Promise private

Summary

Removes a match by clicking on the remove button.

Returns:

Promise:

Promise resolving with the value of the match

selectTagInAutoComplete

Syntax

selectTagInAutoComplete

(
  • The
)
Promise private

Summary

Selects a tag in auto complete.

Parameters:

  • The String
    value of the tag to select in the auto complete. It should be the same value as the one in the available options

Returns:

Promise:
Promise resolving when given tag has been selected in auto complete

setValue

Inherited from Field but overwritten in lib/e2e/fields/MatchField.js:254

Syntax

setValue

(
  • [values]
)
Promise

Summary

Sets field value.

Parameters:

  • [values] Array optional

    List of matches

Returns:

Promise:

Promise resolving when the field is filled

Example:

myField.setValue([
  {
    text: 'text',
    tags: ['tags1', 'tags2', 'tags3']
  },
  {
    text: 'text2',
    tags: ['tags4', 'tags5', 'tags6']
  }
]).then(function() {
  console.log('Value set');
});

setValueUsingAutoCompletion

Inherited from TagsField but overwritten in lib/e2e/fields/MatchField.js:293

Syntax

setValueUsingAutoCompletion

(
  • [values]
)
Promise

Summary

Sets field value using auto completion.

Parameters:

  • [values] Array optional

    List of matches

Returns:

Promise:

Promise resolving when the field is filled

Example:

myField.setValueUsingAutoCompletion([
  {
    text: 'text',
    tags: ['tags1', 'tags2', 'tags3']
  },
  {
    text: 'text2',
    tags: ['tags4', 'tags5', 'tags6']
  }
]).then(function() {
  console.log('Value set');
});

Properties

availableOptions

Syntax

availableOptions

Array

Summary

The list of available options.

baseElement

Syntax

baseElement

ElementFinder final

Summary

Element from where to look for the field (typically the form element).

name

Syntax

name

String final

Summary

Field label.