ui5-test-runner 5.6.3 โ 5.7.0
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 +1 -1
- package/src/browsers.js +1 -1
- package/src/csv-writer.js +3 -0
- package/src/defaults/selenium-webdriver.js +1 -0
- package/src/job.js +2 -2
- package/src/tests.js +1 -1
package/package.json
CHANGED
package/src/browsers.js
CHANGED
|
@@ -131,7 +131,7 @@ async function start (job, url, scripts = []) {
|
|
|
131
131
|
}
|
|
132
132
|
if (resolvedScripts.length) {
|
|
133
133
|
resolvedScripts.unshift(`(function () {
|
|
134
|
-
window['ui5-test-runner/base-host'] = 'http://${job.
|
|
134
|
+
window['ui5-test-runner/base-host'] = 'http://${job.localhost}:${job.port}'
|
|
135
135
|
}())`)
|
|
136
136
|
}
|
|
137
137
|
const progress = newProgress(job, url)
|
package/src/csv-writer.js
CHANGED
|
@@ -4,6 +4,9 @@ const { writeFile } = require('fs/promises')
|
|
|
4
4
|
|
|
5
5
|
const append = (fileName, line) => writeFile(fileName, line + '\n', { flag: 'a+' })
|
|
6
6
|
const escape = value => {
|
|
7
|
+
if (value === undefined) {
|
|
8
|
+
return 'โ'
|
|
9
|
+
}
|
|
7
10
|
const stringValue = value.toString()
|
|
8
11
|
if (stringValue.match(/\r|\n|\t|"/)) {
|
|
9
12
|
return JSON.stringify(stringValue)
|
|
@@ -77,6 +77,7 @@ require('./browser')({
|
|
|
77
77
|
if (driver && settings.capabilities.traces.includes('console')) {
|
|
78
78
|
const logs = await driver.manage().logs().get(logging.Type.BROWSER)
|
|
79
79
|
const logLevelMapping = {
|
|
80
|
+
DEBUG: 'debug',
|
|
80
81
|
INFO: 'log',
|
|
81
82
|
WARNING: 'warning',
|
|
82
83
|
SEVERE: 'error'
|
package/src/job.js
CHANGED
|
@@ -79,7 +79,7 @@ function getCommand (cwd) {
|
|
|
79
79
|
|
|
80
80
|
const DEBUG_OPTION = '(๐ for debugging purpose)'
|
|
81
81
|
const EXPERIMENTAL_OPTION = '[โ ๏ธ experimental]'
|
|
82
|
-
const
|
|
82
|
+
const DANGEROUS_OPTION = '[๐ฃ use carefully]'
|
|
83
83
|
|
|
84
84
|
command
|
|
85
85
|
.name(name)
|
|
@@ -112,7 +112,7 @@ function getCommand (cwd) {
|
|
|
112
112
|
.option('-oi, --output-interval <interval>', '[๐ป๐๐งช๐ก] Interval for reporting progress on non interactive output (CI/CD) (0 means no output)', timeout, 30000)
|
|
113
113
|
.option('--offline [flag]', '[๐ป๐๐งช๐ก] Limit network usage (implies --no-npm-install)', boolean, false)
|
|
114
114
|
.option('--env <name=value...>', '[๐ป๐๐งช๐ก] Set environment variable', arrayOf(string))
|
|
115
|
-
.option('--
|
|
115
|
+
.option('--localhost <host>', `[๐ป๐๐งช๐ก] ${DANGEROUS_OPTION} Hostname for legacy URLs and callbacks`, string, 'localhost')
|
|
116
116
|
|
|
117
117
|
// Common to legacy and url
|
|
118
118
|
.option('--webapp <path>', '[๐ป๐] Base folder of the web application (relative to cwd)', 'webapp')
|
package/src/tests.js
CHANGED
|
@@ -132,7 +132,7 @@ async function process (job) {
|
|
|
132
132
|
module.exports = {
|
|
133
133
|
async execute (job) {
|
|
134
134
|
if (job.mode !== 'url') {
|
|
135
|
-
job.url = [`http
|
|
135
|
+
job.url = [`http://${job.localhost}:${job.port}/${job.testsuite}`]
|
|
136
136
|
} else if (!job.browserCapabilities.scripts) {
|
|
137
137
|
throw UTRError.BROWSER_MISS_SCRIPTS_CAPABILITY()
|
|
138
138
|
}
|