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
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.Control as parameter.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.test.matchers.Matcher()
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:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created 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.Metadata} Metadata object describing this class
isMatching(oControl): boolean
Checks if the matcher is matching - will get an instance of sap.ui.Control as parameter.

Should be overwritten by subclasses

Parameters:
{sap.ui.core.Control}oControl the control that is checked by the matcher
Returns:
{boolean} true if the Control is matching the condition of the matcher