Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
},
"scripts": {
"ui:mockserver": "npm run build:ts:mockserver && ui5 serve -o localService/index.html#Samples-display --config ./ui5-local.yaml",
"ui:mockserver:teststarter": "npm run build:ts:mockserver && ui5 serve -o test/testsuite.qunit.html",
"ui:mockserver:teststarter:local": "npm run build:ts:mockserver && ui5 serve -o test/testsuite.qunit.html --config ./ui5-local.yaml",
"ui:mockserver:proxy": "npm run build:ts:mockserver && ui5 serve -o localService/index.html#Samples-display",
"ui:mockserver:proxy:rta": "npm run build:ts:mockserver && ui5 serve -o localService/variantsManagement.html#Samples-display",
"ui:cap": "npm run build:ts:mockserver && ui5 serve -o localService/index.html#Samples-display --config ./ui5-with-cap.yaml",
Expand Down
8 changes: 4 additions & 4 deletions app/samples/ui5-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ server:
intent:
object: "Samples"
action: "display"
test:
- framework: "Testsuite"
- framework: "OPA5"
- framework: "Qunit"
#test:
# - framework: "Testsuite"
# - framework: "OPA5"
# - framework: "Qunit"
debug: false
- name: sap-fe-mockserver
mountPath: /
Expand Down
16 changes: 16 additions & 0 deletions app/samples/webapp/test/Test.qunit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script
src="../resources/sap/ui/test/starter/runTest.js"
data-sap-ui-resource-roots='{
"test-resources.com.sap.cap.fe.ts.sample": "./"
}'
></script>
</head>
<body class="sapUiBody">
<div id="qunit"></div>
<div id="qunit-fixture"></div>
</body>
</html>
3 changes: 3 additions & 0 deletions app/samples/webapp/test/integration/opaTests.qunit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// import all journeys here
import "./ListReportJourney";
import "./ObjectPageJourney";
18 changes: 18 additions & 0 deletions app/samples/webapp/test/testsuite.qunit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<html>
<head>
<meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta charset="utf-8" />
<title>QUnit test suite for the UI5 Application: com.sap.cap.fe.ts.sample</title>
<script
src="../resources/sap/ui/test/starter/createSuite.js"
data-sap-ui-testsuite="test-resources/com/sap/cap/fe/ts/sample/testsuite.qunit"
data-sap-ui-resource-roots='{
"test-resources.com.sap.cap.fe.ts.sample": "./"
}'
></script>
</head>
<body></body>
</html>
33 changes: 33 additions & 0 deletions app/samples/webapp/test/testsuite.qunit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
export default {
name: "QUnit test suite for the UI5 Application: com.sap.cap.fe.ts.sample",
defaults: {
page: "ui5://test-resources/com/sap/cap/fe/ts/sample/Test.qunit.html?testsuite={suite}&test={name}",
qunit: {
version: 2
},
sinon: {
version: 4
},
ui5: {
language: "EN",
theme: "sap_horizon"
},
coverage: {
only: "com/sap/cap/fe/ts/sample/",
never: "test-resources/com/sap/cap/fe/ts/sample/"
},
loader: {
paths: {
"com/sap/cap/fe/ts/sample": "../"
}
}
},
tests: {
"unit/unitTests": {
title: "Unit tests for com/sap/cap/fe/ts/sample"
},
"integration/opaTests": {
title: "Integration tests for com/sap/cap/fe/ts/sample"
}
}
};
2 changes: 2 additions & 0 deletions app/samples/webapp/test/unit/unitTests.qunit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// import all QUnit tests here
import "./controller/CommentsSectionControllerTest";