@ui5/server 3.1.2 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
-
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-server/compare/v3.1.
|
|
5
|
+
A list of unreleased changes can be found [here](https://github.com/SAP/ui5-server/compare/v3.1.4...HEAD).
|
|
6
|
+
|
|
7
|
+
<a name="v3.1.4"></a>
|
|
8
|
+
## [v3.1.4] - 2023-11-20
|
|
9
|
+
|
|
10
|
+
<a name="v3.1.3"></a>
|
|
11
|
+
## [v3.1.3] - 2023-06-06
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
- **middleware/testRunner:** Update resources from OpenUI5 [`f0c7291`](https://github.com/SAP/ui5-server/commit/f0c7291d2dc1d753e04184fdf2127c278810f0c4)
|
|
14
|
+
|
|
6
15
|
|
|
7
16
|
<a name="v3.1.2"></a>
|
|
8
|
-
## [v3.1.2] - 2023-04-
|
|
17
|
+
## [v3.1.2] - 2023-04-12
|
|
9
18
|
### Bug Fixes
|
|
10
19
|
- Fix JSDoc names of typedefs in MiddlewareUtil. [`dbd6fe1`](https://github.com/SAP/ui5-server/commit/dbd6fe19c229471ba2b8621b97b8f5a9bca56a78)
|
|
11
20
|
|
|
@@ -314,6 +323,8 @@ Only Node.js v10 or higher is supported.
|
|
|
314
323
|
|
|
315
324
|
<a name="v0.0.1"></a>
|
|
316
325
|
## v0.0.1 - 2018-06-06
|
|
326
|
+
[v3.1.4]: https://github.com/SAP/ui5-server/compare/v3.1.3...v3.1.4
|
|
327
|
+
[v3.1.3]: https://github.com/SAP/ui5-server/compare/v3.1.2...v3.1.3
|
|
317
328
|
[v3.1.2]: https://github.com/SAP/ui5-server/compare/v3.1.1...v3.1.2
|
|
318
329
|
[v3.1.1]: https://github.com/SAP/ui5-server/compare/v3.1.0...v3.1.1
|
|
319
330
|
[v3.1.0]: https://github.com/SAP/ui5-server/compare/v3.0.1...v3.1.0
|
|
@@ -108,13 +108,9 @@
|
|
|
108
108
|
window.sap.ui.qunit.TestRunner = {
|
|
109
109
|
|
|
110
110
|
checkTestPage: function(sTestPage, bSequential) {
|
|
111
|
-
var t0 = Date.now();
|
|
112
111
|
var oPromise =
|
|
113
112
|
this._checkTestPage(sTestPage, bSequential)
|
|
114
113
|
.then(function(aTestPages) {
|
|
115
|
-
var t1 = Date.now();
|
|
116
|
-
window.console.log("[DEBUG] checkTestPage(\"" + sTestPage + "\") found " + aTestPages.length + " pages in " + (t1 - t0) + "msec.");
|
|
117
|
-
window.console.log("[DEBUG] checkTestPage(\"" + sTestPage + "\") currently running IFrames: " + window.frames.length);
|
|
118
114
|
return aTestPages;
|
|
119
115
|
});
|
|
120
116
|
oPromise.done = oPromise.then; // compat for Deferred
|
|
@@ -139,8 +135,8 @@
|
|
|
139
135
|
// check for an existing test page and check for test suite or page
|
|
140
136
|
oXHRQueue.ajax(sTestPage).then(function(sData) {
|
|
141
137
|
if (/(?:window\.suite\s*=|function\s*suite\s*\(\s*\)\s*{)/.test(sData)
|
|
142
|
-
|| (/data-sap-ui-testsuite/.test(sData) && !/sap\/ui\/test\/starter\/runTest/.test(sData))
|
|
143
|
-
|
|
138
|
+
|| (/data-sap-ui-testsuite/.test(sData) && !/sap\/ui\/test\/starter\/runTest/.test(sData))
|
|
139
|
+
|| /sap\/ui\/test\/starter\/createSuite/.test(sData) ) {
|
|
144
140
|
var $frame = jQuery("<iframe>");
|
|
145
141
|
var that = this;
|
|
146
142
|
|
|
@@ -194,11 +190,7 @@
|
|
|
194
190
|
findTestPages: function(oIFrame, bSequential) {
|
|
195
191
|
|
|
196
192
|
return Promise.resolve(oIFrame.contentWindow.suite()).then(function(oSuite) {
|
|
197
|
-
window.console.log("[DEBUG] findTestPages oIFrame source: " + oIFrame.src);
|
|
198
193
|
var aPages = oSuite && oSuite.getTestPages() || [];
|
|
199
|
-
for (var i = 0; i < aPages.length; i++) {
|
|
200
|
-
window.console.log("[DEBUG] findTestPages oIFrame source " + oIFrame.src + ": " + aPages[i]);
|
|
201
|
-
}
|
|
202
194
|
return new Promise(function(resolve, reject) {
|
|
203
195
|
|
|
204
196
|
try {
|
|
@@ -303,12 +295,12 @@
|
|
|
303
295
|
},
|
|
304
296
|
|
|
305
297
|
printTestResultAndRemoveFrame : function (oInst, $frame, $framediv, oContext) {
|
|
306
|
-
var
|
|
298
|
+
var oBlanketCoverage = $frame[0].contentWindow._$blanket;
|
|
307
299
|
|
|
308
300
|
// in case of coverage either merge it or set it on the _$blanket object
|
|
309
|
-
if (
|
|
301
|
+
if (oBlanketCoverage) {
|
|
310
302
|
window._$blanket = window._$blanket || {};
|
|
311
|
-
jQuery.each(
|
|
303
|
+
jQuery.each(oBlanketCoverage, function(sModule, aCoverageInfo) {
|
|
312
304
|
if (!window._$blanket[sModule]) {
|
|
313
305
|
window._$blanket[sModule] = aCoverageInfo;
|
|
314
306
|
} else {
|
|
@@ -387,11 +379,8 @@
|
|
|
387
379
|
|
|
388
380
|
if ($qunitBanner.hasClass("qunit-fail") || $qunitBanner.hasClass("qunit-pass")) {
|
|
389
381
|
|
|
390
|
-
//IE workaround for the lack of document.baseURI property
|
|
391
|
-
var baseURI = doc.location.href;
|
|
392
|
-
|
|
393
382
|
if (sTestName == " ") {
|
|
394
|
-
sTestName = "QUnit page for " + baseURI.substring(baseURI.indexOf("test-resources") + 15, baseURI.length);
|
|
383
|
+
sTestName = "QUnit page for " + doc.baseURI.substring(doc.baseURI.indexOf("test-resources") + 15, doc.baseURI.length);
|
|
395
384
|
}
|
|
396
385
|
oContext = oInst.fnGetTestResults(sTestName, $results);
|
|
397
386
|
this.printTestResultAndRemoveFrame(oInst, $frame, $framediv, oContext);
|
|
@@ -473,7 +462,47 @@
|
|
|
473
462
|
},
|
|
474
463
|
|
|
475
464
|
getCoverage: function() {
|
|
476
|
-
return window._$blanket;
|
|
465
|
+
return window._$blanket || window.top.__coverage__;
|
|
466
|
+
},
|
|
467
|
+
|
|
468
|
+
reportCoverage: function (reportToEl) {
|
|
469
|
+
var oCoverage = this.getCoverage();
|
|
470
|
+
|
|
471
|
+
if (!oCoverage) {
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
if ( window.blanket && !window.top.__coverage__ ) {
|
|
476
|
+
window.blanket.report({});
|
|
477
|
+
} else {
|
|
478
|
+
jQuery.ajax("/.ui5/coverage/report", {
|
|
479
|
+
method: "POST",
|
|
480
|
+
data: JSON.stringify(window.top.__coverage__),
|
|
481
|
+
headers: {
|
|
482
|
+
"Content-Type": "application/json"
|
|
483
|
+
}
|
|
484
|
+
})
|
|
485
|
+
.then(function (oData) {
|
|
486
|
+
var aReports = oData.availableReports;
|
|
487
|
+
var oHTMLReport = aReports.filter(function (oCurReport) {
|
|
488
|
+
// HTML is the only one that make sense and
|
|
489
|
+
// provides understandable information
|
|
490
|
+
return oCurReport.report === "html";
|
|
491
|
+
})[0];
|
|
492
|
+
|
|
493
|
+
if (!oHTMLReport) { // Do not render reports if HTML or lcov are not provided
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
var oFrameEl = document.createElement("iframe");
|
|
498
|
+
oFrameEl.src = "/.ui5/coverage/report/" + oHTMLReport.destination;
|
|
499
|
+
oFrameEl.style.border = "none";
|
|
500
|
+
oFrameEl.style.width = "100%";
|
|
501
|
+
oFrameEl.style.height = "100vh";
|
|
502
|
+
oFrameEl.sandbox = "allow-scripts";
|
|
503
|
+
reportToEl.appendChild(oFrameEl);
|
|
504
|
+
});
|
|
505
|
+
}
|
|
477
506
|
},
|
|
478
507
|
|
|
479
508
|
getTestPageUrl: function(sFallbackUrl) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE HTML>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
|
-
|
|
4
|
+
<meta charset="utf-8">
|
|
5
5
|
<title>SAPUI5 QUnit TestRunner</title>
|
|
6
6
|
|
|
7
7
|
<script src="../../../../resources/sap/ui/thirdparty/es6-promise.js"></script>
|
|
@@ -147,9 +147,10 @@
|
|
|
147
147
|
sap.ui.qunit.TestRunner.runTests(aTests, nStep).then(function(oResult) {
|
|
148
148
|
$this.val("Run");
|
|
149
149
|
jQuery("#stop").toggle();
|
|
150
|
-
if (sap.ui.qunit.TestRunner.hasCoverage()
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
if (sap.ui.qunit.TestRunner.hasCoverage()) {
|
|
151
|
+
var $testCoverage = jQuery("div.test-coverage");
|
|
152
|
+
$testCoverage.toggle();
|
|
153
|
+
sap.ui.qunit.TestRunner.reportCoverage( $testCoverage[0] );
|
|
153
154
|
}
|
|
154
155
|
}).then(function() {
|
|
155
156
|
$this.val("Run");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/server",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "UI5 Tooling - Server",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SAP SE",
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"ignoredByWatcher": [
|
|
64
64
|
"test/tmp/**"
|
|
65
65
|
],
|
|
66
|
+
"workerThreads": false,
|
|
66
67
|
"nodeArguments": [
|
|
67
68
|
"--loader=esmock",
|
|
68
69
|
"--no-warnings"
|
|
@@ -114,8 +115,8 @@
|
|
|
114
115
|
"url": "git@github.com:SAP/ui5-server.git"
|
|
115
116
|
},
|
|
116
117
|
"dependencies": {
|
|
117
|
-
"@ui5/builder": "^3.
|
|
118
|
-
"@ui5/fs": "^3.0.
|
|
118
|
+
"@ui5/builder": "^3.1.1",
|
|
119
|
+
"@ui5/fs": "^3.0.5",
|
|
119
120
|
"@ui5/logger": "^3.0.0",
|
|
120
121
|
"body-parser": "^1.20.2",
|
|
121
122
|
"compression": "^1.7.4",
|
|
@@ -136,22 +137,22 @@
|
|
|
136
137
|
},
|
|
137
138
|
"devDependencies": {
|
|
138
139
|
"@istanbuljs/esm-loader-hook": "^0.2.0",
|
|
139
|
-
"@ui5/project": "^3.
|
|
140
|
-
"ava": "^5.
|
|
140
|
+
"@ui5/project": "^3.7.3",
|
|
141
|
+
"ava": "^5.3.1",
|
|
141
142
|
"chokidar-cli": "^3.0.0",
|
|
142
143
|
"cross-env": "^7.0.3",
|
|
143
|
-
"depcheck": "^1.4.
|
|
144
|
-
"docdash": "^2.0.
|
|
145
|
-
"eslint": "^8.
|
|
144
|
+
"depcheck": "^1.4.7",
|
|
145
|
+
"docdash": "^2.0.2",
|
|
146
|
+
"eslint": "^8.54.0",
|
|
146
147
|
"eslint-config-google": "^0.14.0",
|
|
147
148
|
"eslint-plugin-ava": "^14.0.0",
|
|
148
|
-
"eslint-plugin-jsdoc": "^
|
|
149
|
-
"esmock": "^2.
|
|
149
|
+
"eslint-plugin-jsdoc": "^46.9.0",
|
|
150
|
+
"esmock": "^2.6.0",
|
|
150
151
|
"jsdoc": "^4.0.2",
|
|
151
152
|
"nyc": "^15.1.0",
|
|
152
153
|
"open-cli": "^7.2.0",
|
|
153
|
-
"rimraf": "^
|
|
154
|
-
"sinon": "^
|
|
154
|
+
"rimraf": "^5.0.5",
|
|
155
|
+
"sinon": "^16.1.3",
|
|
155
156
|
"supertest": "^6.3.3",
|
|
156
157
|
"tap-xunit": "^2.4.1"
|
|
157
158
|
}
|