Extended test case for sap/ui/test/matchers/BindingPath
since the orinial test cases located in BindinPath.qunit.js
are not sufficient.
The 'extended custom test cases' depict a bug in the BindingPath matcher when modelName
is set and the bound propertyPath
is a root property.
This test case example is based on the 'openui5-basic-template-app'.
The UI5 build and development tooling command line interface (UI5 CLI) has to be installed. For installation instructions please see Installing the UI5 CLI.
- Clone the repository and navigate into it
- Install all dependencies
npm install
- Start a local server
npm start
- Open tespage and run the unit test page
- Note the failed test case no. 4. and 6 and the successfull test case no. 5.
The function
function _getFormattedPath(sPath, bWithNamedModel, bWithContext)
in sap/ui/test/matchers/BindingPath
does substring(1)
for all cases when the model is a named model and the path starts with a '/'. The needed workaround is a leading double slash in case the property is a model root property.