【问题标题】:Sapui5 QUnit testing errors through class not found exceptionsSapui5 QUnit 通过类未找到异常测试错误
【发布时间】:2015-05-26 08:43:03
【问题描述】:

我正在阅读这份 (https://sapui5.netweaver.ondemand.com/sdk/docs/guide/a6b0657d226343da81ad96632cd1bd83.html) 指南。

问题是:

sap.ui.test.qunit.triggerKeydown()

未定义。文档在此处 (http://www.spyvee.com/SAPHTML5_DemoKit/docs/api/symbols/sap.ui.test.qunit.html) 可用,但在 (https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.ui.test.html) 上不可用。

还有下一点:

sap.ui.core.routing.HashChanger()

未定义。如何加载正确的资源 (https://openui5.hana.ondemand.com/docs/api/symbols/sap.ui.core.routing.HashChanger.html)?

到目前为止我所知道的:

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

还有第二点:

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

我怎样才能让我的测试发挥作用?

【问题讨论】:

    标签: javascript unit-testing qunit sapui5


    【解决方案1】:

    问题: sap.ui.test.qunit.triggerKeydown(); 未定义

    解决方案: jQuery.sap.require("sap.ui.test.TestUtils");


    问题: sap.ui.core.routing.HashChanger(); 未定义

    解决方案: jQuery.sap.require("sap.ui.core.routing.HashChanger");

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-20
      • 1970-01-01
      • 2011-07-25
      • 1970-01-01
      • 1970-01-01
      • 2012-05-16
      • 2017-08-06
      • 2018-08-05
      相关资源
      最近更新 更多