2
votes

I am going through this (https://sapui5.netweaver.ondemand.com/sdk/docs/guide/a6b0657d226343da81ad96632cd1bd83.html) guide.

The problems are:

sap.ui.test.qunit.triggerKeydown()

is undefined. The documentation is available here (http://www.spyvee.com/SAPHTML5_DemoKit/docs/api/symbols/sap.ui.test.qunit.html), but not on (https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.ui.test.html).

And next point:

sap.ui.core.routing.HashChanger()

is undefined. How can I load the proper resources (https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.core.routing.HashChanger.html)?

What I know so far:

sap.ui.core.routing //is defined but only contains the HistoryDirection Object
Object {HistoryDirection: Object}

And to the second point:

jQuery.sap.require("sap.ui.test.library"); //retuns the Uncaught Error
Uncaught Error: failed to load 'sap/ui/test/library.js' from https://sapui5.netweaver.ondemand.com/resources/sap/ui/test/library.js: 404 - Not Found

How ca I get my test to work?

1

1 Answers

0
votes

Problem: sap.ui.test.qunit.triggerKeydown(); is undefined

Solution: jQuery.sap.require("sap.ui.test.TestUtils");


Problem: sap.ui.core.routing.HashChanger(); is undefined

Solution: jQuery.sap.require("sap.ui.core.routing.HashChanger");