class sap.ui.test.matchers.BindingPath

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/test/matchers/BindingPath
Application Component: CA-UI5-TA

Checks if a control has a binding context with the exact same binding path.

As of version 1.60, comparison is strict and can include one or more binding criteria:

Note: Before version 1.60, the only available criteria is binding context path.

As of version 1.72, it is available as a declarative matcher with the following syntax:

{
    bindingPath: {
        path: "string",
        modelName: "string",
        propertyPath: "string"
    }
}
As of version 1.81, you can use regular expressions in declarative syntax:
{
    bindingPath: {
        path: {
            regex: {
                source: "binding.*PathValue$",
                flags: "ig"
            }
        }
    }
}


Constructor

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.ui.test.matchers.BindingPath(mSettings?)
Param Type Default Value Description
mSettings? object

Map/JSON-object with initial settings for the new BindingPath.


Properties

Name Type Default Value Description
modelName string

The name of the binding model that is used for matching.

Visibility: public
path any

The value of the binding context path that is used for matching. As of version 1.81, it can also be a regular expression.

Visibility: public
propertyPath any

The value of the binding property path that is used for matching. If (context) path is also set, propertyPath will be assumed to be relative to the binding context path As of version 1.81, it can also be a regular expression.

Since: 1.60.

Visibility: public
value any

value of a static binding property. Use this only for sap.ui.model.StaticBinding

Since: 1.86.

Visibility: public

Methods Overview

Method Description
sap.ui.test.matchers.BindingPath.extend

Creates a new subclass of class sap.ui.test.matchers.BindingPath with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.test.matchers.Matcher.extend.

sap.ui.test.matchers.BindingPath.getMetadata

Returns a metadata object for class sap.ui.test.matchers.BindingPath.

getModelName

Gets current value of property modelName.

The name of the binding model that is used for matching.

getPath

Gets current value of property path.

The value of the binding context path that is used for matching. As of version 1.81, it can also be a regular expression.

getPropertyPath

Gets current value of property propertyPath.

The value of the binding property path that is used for matching. If (context) path is also set, propertyPath will be assumed to be relative to the binding context path As of version 1.81, it can also be a regular expression.

getValue

Gets current value of property value.

value of a static binding property. Use this only for sap.ui.model.StaticBinding

isMatching

Checks if the control has a binding with matching path

setModelName

Sets a new value for property modelName.

The name of the binding model that is used for matching.

When called with a value of null or undefined, the default value of the property will be restored.

setPath

Sets a new value for property path.

The value of the binding context path that is used for matching. As of version 1.81, it can also be a regular expression.

When called with a value of null or undefined, the default value of the property will be restored.

setPropertyPath

Sets a new value for property propertyPath.

The value of the binding property path that is used for matching. If (context) path is also set, propertyPath will be assumed to be relative to the binding context path As of version 1.81, it can also be a regular expression.

When called with a value of null or undefined, the default value of the property will be restored.

setValue

Sets a new value for property value.

value of a static binding property. Use this only for sap.ui.model.StaticBinding

When called with a value of null or undefined, the default value of the property will be restored.

sap.ui.test.matchers.BindingPath.extend

Creates a new subclass of class sap.ui.test.matchers.BindingPath with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.test.matchers.Matcher.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

sap.ui.test.matchers.BindingPath.getMetadata

Returns a metadata object for class sap.ui.test.matchers.BindingPath.

getModelName

Gets current value of property modelName.

The name of the binding model that is used for matching.

getPath

Gets current value of property path.

The value of the binding context path that is used for matching. As of version 1.81, it can also be a regular expression.

getPropertyPath

Gets current value of property propertyPath.

The value of the binding property path that is used for matching. If (context) path is also set, propertyPath will be assumed to be relative to the binding context path As of version 1.81, it can also be a regular expression.

getValue

Gets current value of property value.

value of a static binding property. Use this only for sap.ui.model.StaticBinding

isMatching

Checks if the control has a binding with matching path

Param Type DefaultValue Description
oControl sap.ui.core.Control

the control that is checked by the matcher

setModelName

Sets a new value for property modelName.

The name of the binding model that is used for matching.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sModelName string

New value for property modelName

setPath

Sets a new value for property path.

The value of the binding context path that is used for matching. As of version 1.81, it can also be a regular expression.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
oPath any

New value for property path

setPropertyPath

Sets a new value for property propertyPath.

The value of the binding property path that is used for matching. If (context) path is also set, propertyPath will be assumed to be relative to the binding context path As of version 1.81, it can also be a regular expression.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
oPropertyPath any

New value for property propertyPath

setValue

Sets a new value for property value.

value of a static binding property. Use this only for sap.ui.model.StaticBinding

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
oValue any

New value for property value