class sap.ui.test.matchers.AggregationContainsPropertyEqual

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

Checks if an aggregation contains at least one item that has a property set to a certain value.

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

{
    aggregationContainsPropertyEqual: {
        aggregationName: "string",
        propertyName: "string",
        propertyValue: "string"
    }
}


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.AggregationContainsPropertyEqual(mSettings?)
Param Type Default Value Description
mSettings? object

optional map/JSON-object with initial settings for the new AggregationContainsPropertyEqualMatcher


Properties

Name Type Default Value Description
aggregationName string

The Name of the aggregation that is used for matching.

Visibility: public
propertyName string

The Name of the property that is used for matching.

Visibility: public
propertyValue any

The value of the Property that is used for matching.

Visibility: public

Methods Overview

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

Creates a new subclass of class sap.ui.test.matchers.AggregationContainsPropertyEqual 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.

getAggregationName

Gets current value of property aggregationName.

The Name of the aggregation that is used for matching.

sap.ui.test.matchers.AggregationContainsPropertyEqual.getMetadata

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

getPropertyName

Gets current value of property propertyName.

The Name of the property that is used for matching.

getPropertyValue

Gets current value of property propertyValue.

The value of the Property that is used for matching.

isMatching

Checks if the control has a filled aggregation with at least one control that have a property equaling propertyName/Value.

setAggregationName

Sets a new value for property aggregationName.

The Name of the aggregation that is used for matching.

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

setPropertyName

Sets a new value for property propertyName.

The Name of the property that is used for matching.

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

setPropertyValue

Sets a new value for property propertyValue.

The value of the Property that is used for matching.

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

sap.ui.test.matchers.AggregationContainsPropertyEqual.extend

Creates a new subclass of class sap.ui.test.matchers.AggregationContainsPropertyEqual 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

getAggregationName

Gets current value of property aggregationName.

The Name of the aggregation that is used for matching.

sap.ui.test.matchers.AggregationContainsPropertyEqual.getMetadata

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

getPropertyName

Gets current value of property propertyName.

The Name of the property that is used for matching.

getPropertyValue

Gets current value of property propertyValue.

The value of the Property that is used for matching.

isMatching

Checks if the control has a filled aggregation with at least one control that have a property equaling propertyName/Value.

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

the control that is checked by the matcher

setAggregationName

Sets a new value for property aggregationName.

The Name of the aggregation 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
sAggregationName string

New value for property aggregationName

setPropertyName

Sets a new value for property propertyName.

The Name of the property 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
sPropertyName string

New value for property propertyName

setPropertyValue

Sets a new value for property propertyValue.

The value of the Property 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
oPropertyValue any

New value for property propertyValue