ui5-test-runner 5.2.0 → 5.3.1

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.
@@ -38,21 +38,27 @@ function merge (targetModules, modules) {
38
38
  }
39
39
 
40
40
  function filterModules (modules, url) {
41
- const moduleMatch = url.match(/\?.*\bmoduleId=([^&]+)/)
42
- if (moduleMatch) {
43
- const [, moduleId] = moduleMatch
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) {