ui5-test-runner 5.10.0 → 5.10.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.10.0",
3
+ "version": "5.10.1",
4
4
  "description": "Standalone test runner for UI5",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -76,8 +76,15 @@ require('./browser')({
76
76
  networkWriter
77
77
  }) {
78
78
  const browsers = require(modules.playwright)
79
+ const args = []
80
+
81
+ if (options.browser === 'chromium' && options.unsecure) {
82
+ args.push('--disable-web-security')
83
+ }
84
+
79
85
  browser = await browsers[options.browser].launch({
80
- headless: !options.visible
86
+ headless: !options.visible,
87
+ args
81
88
  })
82
89
 
83
90
  let recordVideo
package/src/report.js CHANGED
@@ -7,8 +7,10 @@ const { filename, allocPromise } = require('./tools')
7
7
  const { fork } = require('child_process')
8
8
  const { getOutput } = require('./output')
9
9
 
10
- async function serialize (job, filename, json) {
11
- await writeFile(join(job.reportDir, `${filename}.js`), `module.exports = ${JSON.stringify(json, (key, value) => {
10
+ async function save (job) {
11
+ // Ensure the file is treated as CommonJS
12
+ await writeFile(join(job.reportDir, 'package.json'), '{"type": "commonjs"}')
13
+ await writeFile(join(job.reportDir, 'job.js'), `module.exports = ${JSON.stringify(job, (key, value) => {
12
14
  if (value && value instanceof RegExp) {
13
15
  return value.toString()
14
16
  }
@@ -16,10 +18,6 @@ async function serialize (job, filename, json) {
16
18
  }, 2)}`)
17
19
  }
18
20
 
19
- async function save (job) {
20
- await serialize(job, 'job', job)
21
- }
22
-
23
21
  function generateTextReport (job) {
24
22
  const { promise, resolve } = allocPromise()
25
23
  const childProcess = fork(