first commit
This commit is contained in:
5
webapp/test/unit/AllTests.js
Normal file
5
webapp/test/unit/AllTests.js
Normal file
@ -0,0 +1,5 @@
|
||||
sap.ui.define([
|
||||
"restaurant/z00124ss25restaurant/test/unit/controller/tablePos.controller"
|
||||
], function () {
|
||||
"use strict";
|
||||
});
|
16
webapp/test/unit/controller/tablePos.controller.js
Normal file
16
webapp/test/unit/controller/tablePos.controller.js
Normal file
@ -0,0 +1,16 @@
|
||||
/*global QUnit*/
|
||||
|
||||
sap.ui.define([
|
||||
"restaurant/z00124ss25restaurant/controller/tablePos.controller"
|
||||
], function (Controller) {
|
||||
"use strict";
|
||||
|
||||
QUnit.module("tablePos Controller");
|
||||
|
||||
QUnit.test("I should test the tablePos controller", function (assert) {
|
||||
var oAppController = new Controller();
|
||||
oAppController.onInit();
|
||||
assert.ok(oAppController);
|
||||
});
|
||||
|
||||
});
|
27
webapp/test/unit/unitTests.qunit.html
Normal file
27
webapp/test/unit/unitTests.qunit.html
Normal file
@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Unit tests for restaurant.z00124ss25restaurant</title>
|
||||
<script
|
||||
id="sap-ui-bootstrap"
|
||||
src="../../resources/sap-ui-core.js"
|
||||
data-sap-ui-resourceroots='{
|
||||
"restaurant/z00124ss25restaurant": "../../",
|
||||
"unit": "."
|
||||
}'
|
||||
data-sap-ui-async="true"
|
||||
data-sap-ui-oninit="module:unit/unitTests.qunit">
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="../../resources/sap/ui/thirdparty/qunit-2.css">
|
||||
<script src="../../resources/sap/ui/thirdparty/qunit-2.js"></script>
|
||||
<script src="../../resources/sap/ui/qunit/qunit-junit.js"></script>
|
||||
<script src="../../resources/sap/ui/qunit/qunit-coverage.js"></script>
|
||||
<script src="../../resources/sap/ui/thirdparty/sinon.js"></script>
|
||||
<script src="../../resources/sap/ui/thirdparty/sinon-qunit.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture"></div>
|
||||
</body>
|
||||
</html>
|
12
webapp/test/unit/unitTests.qunit.js
Normal file
12
webapp/test/unit/unitTests.qunit.js
Normal file
@ -0,0 +1,12 @@
|
||||
/* global QUnit */
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
sap.ui.getCore().attachInit(function () {
|
||||
"use strict";
|
||||
|
||||
sap.ui.require([
|
||||
"restaurant/z00124ss25restaurant/test/unit/AllTests"
|
||||
], function () {
|
||||
QUnit.start();
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user