Abstract Class sap.ui.test.matchers.MatcherModule: sap/ui/test/matchers/Matcher


Matchers for Opa5 - needs to implement an isMatching function that returns a boolean and will get a control instance as parameter
Since: 1.23.
Constructor Summary
new sap.ui.test.matchers.Matcher()Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.
Method Summary
sap.ui.test.matchers.Matcher.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.test.matchers.Matcher with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.test.matchers.Matcher.getMetadata()Returns a metadata object for class sap.ui.test.matchers.Matcher.
isMatching(oControl)Checks if the matcher is matching - will get an instance of sap.ui.core.Control as parameter.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.test.matchers.Matcher()

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

This class does not have its own settings, but all settings applicable to the base type sap.ui.base.ManagedObject can be used.

Method Detail
sap.ui.test.matchers.Matcher.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.ui.test.matchers.Matcher 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.base.ManagedObject.extend.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.ui.test.matchers.Matcher.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.test.matchers.Matcher.
Returns:
sap.ui.base.MetadataMetadata object describing this class
isMatching(oControl): boolean

Checks if the matcher is matching - will get an instance of sap.ui.core.Control as parameter.

Should be overwritten by subclasses

Parameters:
sap.ui.core.ControloControlthe control that is checked by the matcher
Returns:
booleantrue if the Control is matching the condition of the matcher