ui5-test-runner 5.3.0 → 5.3.2
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/package.json +12 -9
- package/src/add-test-pages.js +8 -5
- package/src/browsers.js +301 -297
- package/src/inject/post.js +10 -7
- package/src/inject/qunit-redirect.js +3 -2
- package/src/job.js +393 -392
- package/src/output.js +608 -604
- package/src/qunit-hooks.js +10 -4
package/src/qunit-hooks.js
CHANGED
|
@@ -38,21 +38,27 @@ function merge (targetModules, modules) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
function filterModules (modules, url) {
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
const [, moduleId] =
|
|
41
|
+
const moduleIdMatch = url.match(/\?.*\bmoduleId=([^&]+)/)
|
|
42
|
+
if (moduleIdMatch) {
|
|
43
|
+
const [, moduleId] = moduleIdMatch
|
|
44
44
|
return modules.filter(module => module.moduleId === moduleId)
|
|
45
45
|
}
|
|
46
|
+
const moduleNameMatch = url.match(/\?.*\bmodule=([^&]+)/)
|
|
47
|
+
if (moduleNameMatch) {
|
|
48
|
+
const [, escapedModuleName] = moduleNameMatch
|
|
49
|
+
const moduleName = decodeURIComponent(escapedModuleName)
|
|
50
|
+
return modules.filter(module => module.name === moduleName)
|
|
51
|
+
}
|
|
46
52
|
return modules
|
|
47
53
|
}
|
|
48
54
|
|
|
49
55
|
function get (job, urlWithHash, { testId, modules, isOpa } = {}) {
|
|
50
56
|
const url = stripUrlHash(urlWithHash)
|
|
51
57
|
const page = job.qunitPages && job.qunitPages[url]
|
|
52
|
-
const progress = (job[$browsers] && job[$browsers][url] && job[$browsers][url].progress) || { total: 0, count: 0 }
|
|
53
58
|
if (!page) {
|
|
54
59
|
error(job, url, `No QUnit page found for ${urlWithHash}`)
|
|
55
60
|
}
|
|
61
|
+
const progress = (job[$browsers] && job[$browsers][url] && job[$browsers][url].progress) || { total: 0, count: 0 }
|
|
56
62
|
merge(page.modules, filterModules(modules || [], url))
|
|
57
63
|
progress.total = page.count = page.modules.reduce((total, { tests }) => total + tests.length, 0)
|
|
58
64
|
if (!page.isOpa && isOpa) {
|