ui5-test-runner 5.4.0 โ†’ 5.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui5-test-runner",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "Standalone test runner for UI5",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -50,8 +50,8 @@
50
50
  "reserve": "2.0.5"
51
51
  },
52
52
  "devDependencies": {
53
- "@openui5/types": "^1.132.0",
54
- "@ui5/cli": "^4.0.12",
53
+ "@openui5/types": "^1.132.1",
54
+ "@ui5/cli": "^4.0.13",
55
55
  "@ui5/middleware-code-coverage": "^2.0.1",
56
56
  "dotenv": "^16.4.7",
57
57
  "jest": "^29.7.0",
package/src/browsers.js CHANGED
@@ -80,19 +80,25 @@ async function probe (job) {
80
80
  return browserCapabilities
81
81
  }
82
82
 
83
+ output.debug('browsers/probe', 'initial probing')
83
84
  const browserCapabilities = await execute('probe')
85
+ output.debug('browsers/probe', 'browser capabilities', browserCapabilities)
84
86
  job.browserCapabilities = browserCapabilities
85
87
 
86
88
  const { modules } = browserCapabilities
87
89
  const resolvedModules = {}
88
90
  if (modules.length) {
89
91
  for await (const name of browserCapabilities.modules) {
92
+ output.debug('browsers/probe', `resolving package ${name}...`)
90
93
  resolvedModules[name] = await resolvePackage(job, name)
94
+ output.debug('browsers/probe', `package ${name} resolved`)
91
95
  }
92
96
  }
93
97
  job.browserModules = resolvedModules
94
98
  if (browserCapabilities['probe-with-modules']) {
99
+ output.debug('browsers/probe', 'probing with modules')
95
100
  job.browserCapabilities = await execute('probe/with-modules')
101
+ output.debug('browsers/probe', 'browser capabilities', browserCapabilities)
96
102
  }
97
103
 
98
104
  if (job.debugCapabilitiesNoScript) {
@@ -18,7 +18,7 @@ require('./browser')({
18
18
  async capabilities ({ settings, options }) {
19
19
  return {
20
20
  modules: ['webdriverio'],
21
- screenshot: '.png',
21
+ // screenshot: '.png', // TODO: https://github.com/webdriverio/webdriverio/issues/14108
22
22
  scripts: true,
23
23
  traces: []
24
24
  }
package/src/job-mode.js CHANGED
@@ -32,7 +32,8 @@ function buildAndCheckMode (job) {
32
32
  'failFast',
33
33
  'keepAlive',
34
34
  'alternateNpmPath',
35
- 'outputInterval'
35
+ 'outputInterval',
36
+ 'screenshotTimeout'
36
37
  ], ['start'])
37
38
  return 'capabilities'
38
39
  }
package/src/job.js CHANGED
@@ -31,8 +31,9 @@ function buildArgs (parameters) {
31
31
  } else {
32
32
  args = before
33
33
  }
34
- args.push(`--${toLongName(name)}`)
35
- if (value !== null) {
34
+ const longName = `--${toLongName(name)}`
35
+ args.push(longName)
36
+ if (!longName.startsWith('--no-') && value !== null) {
36
37
  if (Array.isArray(value)) {
37
38
  args.push(...value)
38
39
  } else {
@@ -103,7 +104,7 @@ function getCommand (cwd) {
103
104
  .option('-b, --browser <command>', '[๐Ÿ’ป๐Ÿ”—๐Ÿงช] Browser instantiation command (relative to cwd or use $/ for provided ones)', '$/puppeteer.js')
104
105
  .option('--browser-args <argument...>', '[๐Ÿ’ป๐Ÿ”—๐Ÿงช] Browser instantiation command parameters (use -- instead)')
105
106
  .option('--alternate-npm-path <path>', '[๐Ÿ’ป๐Ÿ”—] Alternate NPM path to look for packages (priority: local, alternate, global)')
106
- .option('--no-npm-install [flag]', '[๐Ÿ’ป๐Ÿ”—๐Ÿงช] Prevent any NPM install (execution may fail if a dependency is missing)', boolean)
107
+ .option('--no-npm-install', '[๐Ÿ’ป๐Ÿ”—๐Ÿงช] Prevent any NPM install (execution may fail if a dependency is missing)')
107
108
  .option('-bt, --browser-close-timeout <timeout>', '[๐Ÿ’ป๐Ÿ”—๐Ÿงช] Maximum waiting time for browser close', timeout, 2000)
108
109
  .option('-br, --browser-retry <count>', '[๐Ÿ’ป๐Ÿ”—๐Ÿงช] Browser instantiation retries : if the command fails unexpectedly, it is re-executed (0 means no retry)', 1)
109
110
  .option('-oi, --output-interval <interval>', '[๐Ÿ’ป๐Ÿ”—๐Ÿงช] Interval for reporting progress on non interactive output (CI/CD) (0 means no output)', timeout, 30000)
@@ -116,14 +117,14 @@ function getCommand (cwd) {
116
117
  .option('--page-close-timeout <timeout>', '[๐Ÿ’ป๐Ÿ”—] Maximum waiting time for page close', timeout, 250)
117
118
  .option('-t, --global-timeout <timeout>', '[๐Ÿ’ป๐Ÿ”—] Limit the pages execution time, fail the page if it takes longer than the timeout (0 means no timeout)', timeout, 0)
118
119
  .option('--screenshot [flag]', '[๐Ÿ’ป๐Ÿ”—] Take screenshots during the tests execution (if supported by the browser)', boolean, true)
119
- .option('--no-screenshot [flag]', '[๐Ÿ’ป๐Ÿ”—] Disable screenshots', boolean)
120
+ .option('--no-screenshot', '[๐Ÿ’ป๐Ÿ”—] Disable screenshots')
120
121
  .option('-st, --screenshot-timeout <timeout>', '[๐Ÿ’ป๐Ÿ”—] Maximum waiting time for browser screenshot', timeout, 5000)
121
122
  .option('-so, --split-opa [flag]', '[๐Ÿ’ป๐Ÿ”—] Split OPA tests using QUnit modules', boolean, false)
122
123
  .option('-rg, --report-generator <path...>', '[๐Ÿ’ป๐Ÿ”—] Report generator paths (relative to cwd or use $/ for provided ones)', ['$/report.js'])
123
124
  .option('--progress-page <path>', '[๐Ÿ’ป๐Ÿ”—] Progress page path (relative to cwd or use $/ for provided ones)', '$/report/default.html')
124
125
 
125
126
  .option('--coverage [flag]', '[๐Ÿ’ป๐Ÿ”—] Enable or disable code coverage', boolean)
126
- .option('--no-coverage [flag]', '[๐Ÿ’ป๐Ÿ”—] Disable code coverage', boolean)
127
+ .option('--no-coverage', '[๐Ÿ’ป๐Ÿ”—] Disable code coverage')
127
128
  .option('-cs, --coverage-settings <path>', '[๐Ÿ’ป๐Ÿ”—] Path to a custom .nycrc.json file providing settings for instrumentation (relative to cwd or use $/ for provided ones)', '$/.nycrc.json')
128
129
  .option('-ctd, --coverage-temp-dir <path>', '[๐Ÿ’ป๐Ÿ”—] Directory to output raw coverage information to (relative to cwd)', '.nyc_output')
129
130
  .option('-crd, --coverage-report-dir <path>', '[๐Ÿ’ป๐Ÿ”—] Directory to store the coverage report files (relative to cwd)', 'coverage')
package/src/npm.js CHANGED
@@ -77,24 +77,31 @@ module.exports = {
77
77
  resolveDependencyPath,
78
78
 
79
79
  async resolvePackage (job, name) {
80
+ const output = getOutput(job)
80
81
  let modulePath
81
82
  let justInstalled = false
83
+ output.debug('npm', `resolving dependency path of package ${name}...`)
82
84
  try {
83
85
  modulePath = resolveDependencyPath(name)
84
86
  } catch (e) {
87
+ output.debug('npm', e)
85
88
  }
86
89
  if (!modulePath) {
90
+ output.debug('npm', `finding dependency path of package ${name}...`);
87
91
  [modulePath, justInstalled] = await findDependencyPath(job, name)
88
92
  }
89
- const output = getOutput(job)
93
+ output.debug('npm', `opening installed package ${name}`)
90
94
  const installedPackage = require(join(modulePath, 'package.json'))
91
95
  const { version: installedVersion } = installedPackage
92
96
  output.resolvedPackage(name, modulePath, installedVersion)
93
97
  if (!justInstalled && !job.offline) {
98
+ output.debug('npm', `fetching latest version of package ${name}`)
94
99
  const latestVersion = await npm(job, 'view', name, 'version')
95
100
  if (latestVersion !== installedVersion) {
96
101
  output.packageNotLatest(name, latestVersion)
97
102
  }
103
+ } else {
104
+ output.debug('npm', `justInstalled=${justInstalled} offline=${job.offline}`)
98
105
  }
99
106
  return modulePath
100
107
  }
package/src/output.js CHANGED
@@ -286,7 +286,7 @@ function build (job) {
286
286
 
287
287
  debug: (moduleSpecifier, ...args) => {
288
288
  const [mainModule] = moduleSpecifier.split('/')
289
- if (job.debugVerbose && (job.debugVerbose.includes(moduleSpecifier) || job.debugVerbose.includes(mainModule))) {
289
+ if (job.debugVerbose && (job.debugVerbose.includes('*') || job.debugVerbose.includes(moduleSpecifier) || job.debugVerbose.includes(mainModule))) {
290
290
  wrap(() => {
291
291
  console.log(`๐Ÿž${moduleSpecifier}`, ...args)
292
292
  output(job, `๐Ÿž${moduleSpecifier}`, ...args)