-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate tutorial and generator template to use Test Starter setup (#19)
- Loading branch information
1 parent
20757d0
commit 2565b2c
Showing
72 changed files
with
400 additions
and
672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.myorg.myapp": "./" | ||
}' | ||
></script> | ||
</head> | ||
<body class="sapUiBody"> | ||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
</body> | ||
</html> |
30 changes: 0 additions & 30 deletions
30
exercises/ex1/com.myorg.myapp/webapp/test/integration/opaTests.qunit.html
This file was deleted.
Oops, something went wrong.
8 changes: 1 addition & 7 deletions
8
exercises/ex1/com.myorg.myapp/webapp/test/integration/opaTests.qunit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1 @@ | ||
// https://api.qunitjs.com/config/autostart/ | ||
QUnit.config.autostart = false; | ||
|
||
// import all your OPA journeys here | ||
void Promise.all([import("integration/HelloJourney")]).then(() => { | ||
QUnit.start(); | ||
}); | ||
import "./HelloJourney"; |
22 changes: 12 additions & 10 deletions
22
exercises/ex1/com.myorg.myapp/webapp/test/testsuite.qunit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<!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.myorg.myapp</title> | ||
<script src="../resources/sap/ui/qunit/qunit-redirect.js"></script> | ||
<script src="testsuite.qunit.js" data-sap-ui-testsuite></script> | ||
</head> | ||
<body></body> | ||
<head> | ||
<meta charset="utf-8"> | ||
<script | ||
src="../resources/sap/ui/test/starter/createSuite.js" | ||
data-sap-ui-testsuite="test-resources/com/myorg/myapp/testsuite.qunit" | ||
data-sap-ui-resource-roots='{ | ||
"test-resources.com.myorg.myapp": "./" | ||
}' | ||
></script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
32 changes: 24 additions & 8 deletions
32
exercises/ex1/com.myorg.myapp/webapp/test/testsuite.qunit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
window.suite = function () { | ||
const suite = new parent.jsUnitTestSuite(); | ||
const sContextPath = location.pathname.match(/(.*\/)(?:[^/]+)/)?.[1]; | ||
suite.addTestPage(sContextPath + "unit/unitTests.qunit.html"); | ||
suite.addTestPage(sContextPath + "integration/opaTests.qunit.html"); | ||
return suite; | ||
export default { | ||
name: "Unit test suite for the UI5 Application: com.myorg.myapp", | ||
defaults: { | ||
page: "ui5://test-resources/com/myorg/myapp/Test.qunit.html?testsuite={suite}&test={name}", | ||
qunit: { | ||
version: 2 | ||
}, | ||
ui5: { | ||
theme: "sap_horizon" | ||
}, | ||
loader: { | ||
paths: { | ||
"com/myorg/myapp": "../" | ||
} | ||
} | ||
}, | ||
tests: { | ||
"unit/unitTests": { | ||
title: "Unit tests for the UI5 Application: com.myorg.myapp" | ||
}, | ||
"integration/opaTests": { | ||
title: "Integration tests for the UI5 Application: com.myorg.myapp" | ||
} | ||
} | ||
}; |
30 changes: 0 additions & 30 deletions
30
exercises/ex1/com.myorg.myapp/webapp/test/unit/unitTests.qunit.html
This file was deleted.
Oops, something went wrong.
8 changes: 1 addition & 7 deletions
8
exercises/ex1/com.myorg.myapp/webapp/test/unit/unitTests.qunit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1 @@ | ||
// https://api.qunitjs.com/config/autostart/ | ||
QUnit.config.autostart = false; | ||
|
||
// import all your QUnit tests here | ||
void Promise.all([import("unit/controller/Main.qunit")]).then(() => { | ||
QUnit.start(); | ||
}); | ||
import "./controller/Main.qunit"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.myorg.myapp": "./" | ||
}' | ||
></script> | ||
</head> | ||
<body class="sapUiBody"> | ||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
</body> | ||
</html> |
30 changes: 0 additions & 30 deletions
30
exercises/ex2/com.myorg.myapp/webapp/test/integration/opaTests.qunit.html
This file was deleted.
Oops, something went wrong.
8 changes: 1 addition & 7 deletions
8
exercises/ex2/com.myorg.myapp/webapp/test/integration/opaTests.qunit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1 @@ | ||
// https://api.qunitjs.com/config/autostart/ | ||
QUnit.config.autostart = false; | ||
|
||
// import all your OPA journeys here | ||
void Promise.all([import("integration/HelloJourney")]).then(() => { | ||
QUnit.start(); | ||
}); | ||
import "./HelloJourney"; |
18 changes: 10 additions & 8 deletions
18
exercises/ex2/com.myorg.myapp/webapp/test/testsuite.qunit.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<!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.myorg.myapp</title> | ||
<script src="../resources/sap/ui/qunit/qunit-redirect.js"></script> | ||
<script src="testsuite.qunit.js" data-sap-ui-testsuite></script> | ||
<meta charset="utf-8"> | ||
<script | ||
src="../resources/sap/ui/test/starter/createSuite.js" | ||
data-sap-ui-testsuite="test-resources/com/myorg/myapp/testsuite.qunit" | ||
data-sap-ui-resource-roots='{ | ||
"test-resources.com.myorg.myapp": "./" | ||
}' | ||
></script> | ||
</head> | ||
<body></body> | ||
<body> | ||
</body> | ||
</html> |
32 changes: 24 additions & 8 deletions
32
exercises/ex2/com.myorg.myapp/webapp/test/testsuite.qunit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
window.suite = function () { | ||
const suite = new parent.jsUnitTestSuite(); | ||
const sContextPath = location.pathname.match(/(.*\/)(?:[^/]+)/)?.[1]; | ||
suite.addTestPage(sContextPath + "unit/unitTests.qunit.html"); | ||
suite.addTestPage(sContextPath + "integration/opaTests.qunit.html"); | ||
return suite; | ||
export default { | ||
name: "Unit test suite for the UI5 Application: com.myorg.myapp", | ||
defaults: { | ||
page: "ui5://test-resources/com/myorg/myapp/Test.qunit.html?testsuite={suite}&test={name}", | ||
qunit: { | ||
version: 2 | ||
}, | ||
ui5: { | ||
theme: "sap_horizon" | ||
}, | ||
loader: { | ||
paths: { | ||
"com/myorg/myapp": "../" | ||
} | ||
} | ||
}, | ||
tests: { | ||
"unit/unitTests": { | ||
title: "Unit tests for the UI5 Application: com.myorg.myapp" | ||
}, | ||
"integration/opaTests": { | ||
title: "Integration tests for the UI5 Application: com.myorg.myapp" | ||
} | ||
} | ||
}; |
30 changes: 0 additions & 30 deletions
30
exercises/ex2/com.myorg.myapp/webapp/test/unit/unitTests.qunit.html
This file was deleted.
Oops, something went wrong.
8 changes: 1 addition & 7 deletions
8
exercises/ex2/com.myorg.myapp/webapp/test/unit/unitTests.qunit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1 @@ | ||
// https://api.qunitjs.com/config/autostart/ | ||
QUnit.config.autostart = false; | ||
|
||
// import all your QUnit tests here | ||
void Promise.all([import("unit/controller/Main.qunit")]).then(() => { | ||
QUnit.start(); | ||
}); | ||
import "./controller/Main.qunit"; |
Oops, something went wrong.