first commit

This commit is contained in:
Dongho Kim
2025-05-21 15:00:13 +00:00
commit da3ac0e469
39 changed files with 16602 additions and 0 deletions

View File

@ -0,0 +1,13 @@
sap.ui.define([
"sap/ui/test/Opa5",
"./arrangements/Startup",
"./NavigationJourney"
], function (Opa5, Startup) {
"use strict";
Opa5.extendConfig({
arrangements: new Startup(),
viewNamespace: "restaurant.z00124ss25restaurant.view.",
autoWait: true
});
});

View File

@ -0,0 +1,23 @@
/*global QUnit*/
sap.ui.define([
"sap/ui/test/opaQunit",
"./pages/App",
"./pages/tablePos"
], function (opaTest) {
"use strict";
QUnit.module("Navigation Journey");
opaTest("Should see the initial page of the app", function (Given, When, Then) {
// Arrangements
Given.iStartMyApp();
// Assertions
Then.onTheAppPage.iShouldSeeTheApp();
Then.onTheViewPage.iShouldSeeThePageView();
//Cleanup
Then.iTeardownMyApp();
});
});

View File

@ -0,0 +1,25 @@
sap.ui.define([
"sap/ui/test/Opa5"
], function (Opa5) {
"use strict";
return Opa5.extend("integration.arrangements.Startup", {
iStartMyApp: function (oOptionsParameter) {
var oOptions = oOptionsParameter || {};
// start the app with a minimal delay to make tests fast but still async to discover basic timing issues
oOptions.delay = oOptions.delay || 50;
// start the app UI component
this.iStartMyUIComponent({
componentConfig: {
name: "restaurant.z00124ss25restaurant",
async: true
},
hash: oOptions.hash,
autoWait: oOptions.autoWait
});
}
});
});

View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Integration tests for Basic Template</title>
<script
id="sap-ui-bootstrap"
src="../../resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resourceroots='{
"restaurant.z00124ss25restaurant": "../../",
"integration": "./"
}'
data-sap-ui-animation="false"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-preload="async"
data-sap-ui-oninit="module:integration/opaTests.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>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
</body>
</html>

View File

@ -0,0 +1,7 @@
/* global QUnit */
sap.ui.require(["restaurant/z00124ss25restaurant/test/integration/AllJourneys"
], function () {
QUnit.config.autostart = false;
QUnit.start();
});

View File

@ -0,0 +1,28 @@
sap.ui.define([
"sap/ui/test/Opa5"
], function (Opa5) {
"use strict";
var sViewName = "App";
Opa5.createPageObjects({
onTheAppPage: {
actions: {},
assertions: {
iShouldSeeTheApp: function () {
return this.waitFor({
id: "app",
viewName: sViewName,
success: function () {
Opa5.assert.ok(true, "The " + sViewName + " view is displayed");
},
errorMessage: "Did not find the " + sViewName + " view"
});
}
}
}
});
});

View File

@ -0,0 +1,28 @@
sap.ui.define([
"sap/ui/test/Opa5"
], function (Opa5) {
"use strict";
var sViewName = "tablePos";
Opa5.createPageObjects({
onTheViewPage: {
actions: {},
assertions: {
iShouldSeeThePageView: function () {
return this.waitFor({
id: "page",
viewName: sViewName,
success: function () {
Opa5.assert.ok(true, "The " + sViewName + " view is displayed");
},
errorMessage: "Did not find the " + sViewName + " view"
});
}
}
}
});
});