ui5-test-runner 5.13.1 → 6.0.0-beta.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/README.md +3 -2
- package/dist/Npm.js +80 -0
- package/dist/browsers/IBrowser.js +1 -0
- package/dist/browsers/factory.js +9 -0
- package/dist/browsers/puppeteer.js +158 -0
- package/dist/cli.js +20 -0
- package/dist/configuration/CommandLine.js +112 -0
- package/dist/configuration/Configuration.js +1 -0
- package/dist/configuration/ConfigurationValidator.js +79 -0
- package/dist/configuration/Option.js +1 -0
- package/dist/configuration/OptionValidationError.js +15 -0
- package/dist/configuration/indexedOptions.js +13 -0
- package/dist/configuration/options.js +191 -0
- package/dist/configuration/validators/OptionValidator.js +1 -0
- package/dist/configuration/validators/boolean.js +15 -0
- package/dist/configuration/validators/browser.js +11 -0
- package/dist/configuration/validators/fsEntry.js +70 -0
- package/dist/configuration/validators/index.js +20 -0
- package/dist/configuration/validators/integer.js +10 -0
- package/dist/configuration/validators/percent.js +17 -0
- package/dist/configuration/validators/regexp.js +20 -0
- package/dist/configuration/validators/string.js +7 -0
- package/dist/configuration/validators/timeout.js +24 -0
- package/dist/configuration/validators/url.js +8 -0
- package/dist/modes/ModeFunction.js +1 -0
- package/dist/modes/Modes.js +9 -0
- package/dist/modes/execute.js +27 -0
- package/dist/modes/help.js +3 -0
- package/dist/modes/log/ILogStorage.js +1 -0
- package/dist/modes/log/LogMetrics.js +9 -0
- package/dist/modes/log/LogReader.js +37 -0
- package/dist/modes/log/LogStorage.js +68 -0
- package/dist/modes/log/REserve.js +101 -0
- package/dist/modes/log/index.js +58 -0
- package/dist/modes/test/REserve.js +31 -0
- package/dist/modes/test/agent.js +8 -0
- package/dist/modes/test/browser.js +37 -0
- package/dist/modes/test/index.js +66 -0
- package/dist/modes/test/pageTask.js +145 -0
- package/dist/modes/test/report.js +3 -0
- package/dist/modes/test/server.js +109 -0
- package/dist/modes/version.js +11 -0
- package/dist/platform/Exit.js +139 -0
- package/dist/platform/FileSystem.js +13 -0
- package/dist/platform/Host.js +10 -0
- package/dist/platform/Http.js +38 -0
- package/dist/platform/Path.js +5 -0
- package/dist/platform/Process.js +133 -0
- package/dist/platform/Terminal.js +47 -0
- package/dist/platform/Thread.js +43 -0
- package/dist/platform/ZLib.js +7 -0
- package/dist/platform/assert.js +17 -0
- package/dist/platform/constants.js +5 -0
- package/dist/platform/environment.js +28 -0
- package/dist/platform/index.js +13 -0
- package/dist/platform/logger/ILogger.js +1 -0
- package/dist/platform/logger/allCompressed.js +54 -0
- package/dist/platform/logger/compress.js +277 -0
- package/dist/platform/logger/output/BaseLoggerOutput.js +158 -0
- package/dist/platform/logger/output/InteractiveLoggerOutput.js +102 -0
- package/dist/platform/logger/output/StaticLoggerOutput.js +32 -0
- package/dist/platform/logger/output/factory.js +10 -0
- package/dist/platform/logger/output.js +58 -0
- package/dist/platform/logger/proxy.js +6 -0
- package/dist/platform/logger/toInternalLogAttributes.js +22 -0
- package/dist/platform/logger/types.js +7 -0
- package/dist/platform/logger.js +138 -0
- package/dist/platform/mock.js +104 -0
- package/dist/platform/version.js +8 -0
- package/dist/platform/workerBootstrap.js +21 -0
- package/dist/reports/html.js +46 -0
- package/dist/types/AgentState.js +1 -0
- package/dist/types/CommonTestReportFormat.js +50 -0
- package/dist/types/IError.js +1 -0
- package/dist/types/IUserInterfaceController.js +1 -0
- package/dist/types/typeUtilities.js +1 -0
- package/dist/ui/agent.js +3 -0
- package/dist/ui/html-report.js +2 -0
- package/dist/ui/lib.js +1 -0
- package/dist/ui/log-viewer.js +2 -0
- package/dist/utils/node/Folder.js +28 -0
- package/dist/utils/node/FramedStreamReader.js +86 -0
- package/dist/utils/node/FramedStreamWriter.js +27 -0
- package/dist/utils/shared/ProgressBar.js +43 -0
- package/dist/utils/shared/TestReportBuilder.js +48 -0
- package/dist/utils/shared/memoize.js +19 -0
- package/dist/utils/shared/object.js +8 -0
- package/dist/utils/shared/parallelize.js +59 -0
- package/dist/utils/shared/string.js +23 -0
- package/dist/utils/shared/toIError.js +17 -0
- package/package.json +73 -50
- package/.releaserc +0 -5
- package/index.js +0 -175
- package/jest.config.json +0 -31
- package/src/add-test-pages.js +0 -67
- package/src/batch.js +0 -214
- package/src/browsers.js +0 -319
- package/src/capabilities/index.js +0 -204
- package/src/capabilities/tests/basic/iframe.html +0 -8
- package/src/capabilities/tests/basic/index.html +0 -12
- package/src/capabilities/tests/basic/index.js +0 -20
- package/src/capabilities/tests/basic/ui5.html +0 -24
- package/src/capabilities/tests/dynamic-include/index.js +0 -21
- package/src/capabilities/tests/dynamic-include/mix.html +0 -11
- package/src/capabilities/tests/dynamic-include/one.html +0 -11
- package/src/capabilities/tests/dynamic-include/post.js +0 -3
- package/src/capabilities/tests/dynamic-include/test.js +0 -1
- package/src/capabilities/tests/dynamic-include/two.html +0 -11
- package/src/capabilities/tests/index.js +0 -16
- package/src/capabilities/tests/local-storage/index.html +0 -16
- package/src/capabilities/tests/local-storage/index.js +0 -21
- package/src/capabilities/tests/screenshot/index.html +0 -23
- package/src/capabilities/tests/screenshot/index.js +0 -24
- package/src/capabilities/tests/scripts/coverage.html +0 -32
- package/src/capabilities/tests/scripts/iframe.html +0 -18
- package/src/capabilities/tests/scripts/index.js +0 -59
- package/src/capabilities/tests/scripts/qunit.html +0 -22
- package/src/capabilities/tests/scripts/testsuite.html +0 -10
- package/src/capabilities/tests/scripts/testsuite.js +0 -8
- package/src/capabilities/tests/timeout/index.html +0 -21
- package/src/capabilities/tests/timeout/index.js +0 -19
- package/src/capabilities/tests/traces/index.html +0 -18
- package/src/capabilities/tests/traces/index.js +0 -81
- package/src/capabilities/tests/ui5/focus.html +0 -89
- package/src/capabilities/tests/ui5/index.js +0 -39
- package/src/capabilities/tests/ui5/language.html +0 -50
- package/src/capabilities/tests/ui5/timezone.html +0 -27
- package/src/clean.js +0 -22
- package/src/cors.js +0 -21
- package/src/coverage.js +0 -384
- package/src/csv-reader.js +0 -36
- package/src/csv-writer.js +0 -55
- package/src/defaults/.nycrc.json +0 -4
- package/src/defaults/browser.js +0 -217
- package/src/defaults/happy-dom.js +0 -123
- package/src/defaults/jsdom/compatibility.js +0 -163
- package/src/defaults/jsdom/debug.js +0 -23
- package/src/defaults/jsdom/resource-loader.js +0 -44
- package/src/defaults/jsdom/sap.ui.test.matchers.visible.js +0 -39
- package/src/defaults/jsdom.js +0 -95
- package/src/defaults/json-report.js +0 -36
- package/src/defaults/junit-xml-report.js +0 -90
- package/src/defaults/playwright.js +0 -142
- package/src/defaults/puppeteer.js +0 -124
- package/src/defaults/report/common.js +0 -38
- package/src/defaults/report/decompress.js +0 -19
- package/src/defaults/report/default.html +0 -99
- package/src/defaults/report/main.js +0 -69
- package/src/defaults/report/progress.js +0 -60
- package/src/defaults/report/styles.css +0 -66
- package/src/defaults/report.js +0 -91
- package/src/defaults/scan-ui5.js +0 -26
- package/src/defaults/selenium-webdriver/chrome.js +0 -39
- package/src/defaults/selenium-webdriver/edge.js +0 -24
- package/src/defaults/selenium-webdriver/firefox.js +0 -30
- package/src/defaults/selenium-webdriver.js +0 -129
- package/src/defaults/text-report.js +0 -108
- package/src/defaults/webdriverio.js +0 -80
- package/src/end.js +0 -62
- package/src/endpoints.js +0 -219
- package/src/error.js +0 -54
- package/src/get-job-progress.js +0 -78
- package/src/handle.js +0 -43
- package/src/if.js +0 -10
- package/src/inject/jest2qunit.js +0 -289
- package/src/inject/opa-iframe-coverage.js +0 -22
- package/src/inject/post.js +0 -141
- package/src/inject/qunit-hooks.js +0 -107
- package/src/inject/qunit-redirect.js +0 -65
- package/src/inject/ui5-coverage.js +0 -33
- package/src/job-mode.js +0 -65
- package/src/job.js +0 -493
- package/src/npm.js +0 -136
- package/src/options.js +0 -95
- package/src/output.js +0 -739
- package/src/parallelize.js +0 -63
- package/src/qunit-hooks.js +0 -219
- package/src/report.js +0 -89
- package/src/reserve.js +0 -25
- package/src/start.js +0 -133
- package/src/symbols.js +0 -8
- package/src/tests.js +0 -183
- package/src/timeout.js +0 -53
- package/src/tools.js +0 -179
- package/src/ui5.js +0 -199
- package/src/unhandled.js +0 -32
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const { join } = require('path')
|
|
4
|
-
const { exec } = require('child_process')
|
|
5
|
-
|
|
6
|
-
let browser
|
|
7
|
-
let context
|
|
8
|
-
let page
|
|
9
|
-
|
|
10
|
-
require('./browser')({
|
|
11
|
-
metadata: {
|
|
12
|
-
name: 'playwright',
|
|
13
|
-
options: [
|
|
14
|
-
['browser', 'chromium', 'firefox', 'webkit'],
|
|
15
|
-
'visible',
|
|
16
|
-
'viewport',
|
|
17
|
-
'language',
|
|
18
|
-
'unsecure',
|
|
19
|
-
['-v, --video', 'Record video', false],
|
|
20
|
-
['-n, --har', 'Record network activity with har file', false]
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
async capabilities ({ settings, options }) {
|
|
25
|
-
const capabilities = {
|
|
26
|
-
modules: ['playwright'],
|
|
27
|
-
screenshot: '.png',
|
|
28
|
-
scripts: true,
|
|
29
|
-
traces: ['console', 'network']
|
|
30
|
-
}
|
|
31
|
-
if (!settings.modules) {
|
|
32
|
-
return {
|
|
33
|
-
...capabilities,
|
|
34
|
-
'probe-with-modules': true
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return await new Promise((resolve, reject) => {
|
|
38
|
-
exec('npx playwright install', (err, stdout, stderr) => {
|
|
39
|
-
console.log(stdout)
|
|
40
|
-
console.error(stderr)
|
|
41
|
-
if (err) {
|
|
42
|
-
reject(new Error('Unable to finalize playwright installation'))
|
|
43
|
-
} else {
|
|
44
|
-
resolve(capabilities)
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
})
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
async screenshot ({ filename }) {
|
|
51
|
-
if (page) {
|
|
52
|
-
await page.screenshot({
|
|
53
|
-
path: filename,
|
|
54
|
-
fullPage: true
|
|
55
|
-
})
|
|
56
|
-
return true
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
async beforeExit () {
|
|
61
|
-
if (page) {
|
|
62
|
-
await page.close()
|
|
63
|
-
}
|
|
64
|
-
if (context) {
|
|
65
|
-
await context.close()
|
|
66
|
-
}
|
|
67
|
-
if (browser) {
|
|
68
|
-
await browser.close()
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
async run ({
|
|
73
|
-
settings: { url, scripts, modules, dir },
|
|
74
|
-
options,
|
|
75
|
-
consoleWriter,
|
|
76
|
-
networkWriter
|
|
77
|
-
}) {
|
|
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
|
-
|
|
85
|
-
browser = await browsers[options.browser].launch({
|
|
86
|
-
headless: !options.visible,
|
|
87
|
-
args
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
let recordVideo
|
|
91
|
-
if (options.video) {
|
|
92
|
-
recordVideo = {
|
|
93
|
-
dir
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
let recordHar
|
|
98
|
-
if (options.har) {
|
|
99
|
-
recordHar = {
|
|
100
|
-
path: join(dir, 'network.har')
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
context = await browser.newContext({
|
|
105
|
-
viewport: {
|
|
106
|
-
width: options.viewportWidth,
|
|
107
|
-
height: options.viewportHeight
|
|
108
|
-
},
|
|
109
|
-
locale: options.language[0],
|
|
110
|
-
bypassCSP: options.unsecure,
|
|
111
|
-
ignoreHTTPSErrors: options.unsecure,
|
|
112
|
-
recordVideo,
|
|
113
|
-
recordHar
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
context.setDefaultNavigationTimeout(0)
|
|
117
|
-
|
|
118
|
-
if (scripts && scripts.length) {
|
|
119
|
-
for (const content of scripts) {
|
|
120
|
-
await context.addInitScript({ content })
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
page = await context.newPage()
|
|
125
|
-
|
|
126
|
-
page
|
|
127
|
-
.on('console', message => consoleWriter.append({
|
|
128
|
-
type: message.type(),
|
|
129
|
-
text: message.text()
|
|
130
|
-
}))
|
|
131
|
-
.on('response', response => {
|
|
132
|
-
const request = response.request()
|
|
133
|
-
networkWriter.append({
|
|
134
|
-
method: request.method(),
|
|
135
|
-
url: response.url(),
|
|
136
|
-
status: response.status()
|
|
137
|
-
})
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
await page.goto(url)
|
|
141
|
-
}
|
|
142
|
-
})
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
let browser
|
|
4
|
-
let page
|
|
5
|
-
|
|
6
|
-
console.time('⏲ run ')
|
|
7
|
-
|
|
8
|
-
require('./browser')({
|
|
9
|
-
metadata: {
|
|
10
|
-
name: 'puppeteer',
|
|
11
|
-
options: [
|
|
12
|
-
'visible',
|
|
13
|
-
['--firefox [flag]', 'Use firefox instead of chrome', false],
|
|
14
|
-
'binary',
|
|
15
|
-
'viewport',
|
|
16
|
-
'language',
|
|
17
|
-
'unsecure',
|
|
18
|
-
['--basic-auth-username <username>', 'Username for basic authentication', ''],
|
|
19
|
-
['--basic-auth-password <password>', 'Password for basic authentication', '']
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
async capabilities ({ settings, options }) {
|
|
24
|
-
return {
|
|
25
|
-
modules: ['puppeteer'],
|
|
26
|
-
screenshot: '.png',
|
|
27
|
-
scripts: !options.firefox,
|
|
28
|
-
traces: ['console', 'network']
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
async screenshot ({ filename }) {
|
|
33
|
-
if (page) {
|
|
34
|
-
await page.screenshot({
|
|
35
|
-
path: filename,
|
|
36
|
-
fullPage: true
|
|
37
|
-
})
|
|
38
|
-
return true
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
async beforeExit () {
|
|
43
|
-
if (page) {
|
|
44
|
-
await page.close()
|
|
45
|
-
}
|
|
46
|
-
if (browser) {
|
|
47
|
-
await browser.close()
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
async run ({
|
|
52
|
-
settings: { url, scripts, modules },
|
|
53
|
-
options,
|
|
54
|
-
consoleWriter,
|
|
55
|
-
networkWriter
|
|
56
|
-
}) {
|
|
57
|
-
console.timeEnd('⏲ run ')
|
|
58
|
-
console.time('⏲ require ')
|
|
59
|
-
const puppeteer = require(modules.puppeteer)
|
|
60
|
-
console.timeEnd('⏲ require ')
|
|
61
|
-
|
|
62
|
-
let args = []
|
|
63
|
-
let product
|
|
64
|
-
if (options.firefox) {
|
|
65
|
-
product = 'firefox'
|
|
66
|
-
} else {
|
|
67
|
-
args = options.chromeArgs()
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
console.time('⏲ launch ')
|
|
71
|
-
browser = await puppeteer.launch({
|
|
72
|
-
product,
|
|
73
|
-
executablePath: options.binary,
|
|
74
|
-
headless: options.visible ? false : 'new',
|
|
75
|
-
defaultViewport: null,
|
|
76
|
-
args
|
|
77
|
-
})
|
|
78
|
-
console.timeEnd('⏲ launch ')
|
|
79
|
-
|
|
80
|
-
page = (await browser.pages())[0]
|
|
81
|
-
|
|
82
|
-
if (options.unsecure) {
|
|
83
|
-
await page.setBypassCSP(true)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (options.basicAuthUsername || options.basicAuthPassword) {
|
|
87
|
-
await page.authenticate({ username: options.basicAuthUsername, password: options.basicAuthPassword })
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
page
|
|
91
|
-
.on('console', message => consoleWriter.append({
|
|
92
|
-
type: message.type(),
|
|
93
|
-
text: message.text()
|
|
94
|
-
}))
|
|
95
|
-
.on('response', response => {
|
|
96
|
-
const request = response.request()
|
|
97
|
-
networkWriter.append({
|
|
98
|
-
method: request.method(),
|
|
99
|
-
url: response.url(),
|
|
100
|
-
status: response.status()
|
|
101
|
-
})
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
console.time('⏲ scripts ')
|
|
105
|
-
if (scripts && scripts.length) {
|
|
106
|
-
for (const script of scripts) {
|
|
107
|
-
await page.evaluateOnNewDocument(script)
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
console.timeEnd('⏲ scripts ')
|
|
111
|
-
|
|
112
|
-
await page.setDefaultNavigationTimeout(0)
|
|
113
|
-
console.time('⏲ navigate ')
|
|
114
|
-
await page.goto(url)
|
|
115
|
-
console.timeEnd('⏲ navigate ')
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
async error ({ error: e, exit }) {
|
|
119
|
-
// Lots of threads on this message but no clear solution
|
|
120
|
-
if (e.message === 'Navigation failed because browser has disconnected!') {
|
|
121
|
-
await exit(0)
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
})
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
/* global punybind, punyexpr */
|
|
3
|
-
|
|
4
|
-
const report = {}
|
|
5
|
-
|
|
6
|
-
report.elapsed = function (start, end = Date.now()) {
|
|
7
|
-
if (typeof end === 'string') {
|
|
8
|
-
end = new Date(end).getTime()
|
|
9
|
-
}
|
|
10
|
-
if (typeof start === 'string') {
|
|
11
|
-
start = new Date(start).getTime()
|
|
12
|
-
}
|
|
13
|
-
const ms = end - start
|
|
14
|
-
if (isNaN(ms)) {
|
|
15
|
-
return '-'
|
|
16
|
-
}
|
|
17
|
-
if (ms > 5000) {
|
|
18
|
-
const mins = Math.floor(ms / 60000)
|
|
19
|
-
const secs = Math.floor((ms % 60000) / 1000)
|
|
20
|
-
return `${mins.toString().padStart(2, 0)}:${secs.toString().padStart(2, 0)}`
|
|
21
|
-
}
|
|
22
|
-
return `${ms} ms`
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
let setReady
|
|
26
|
-
report.ready = new Promise(resolve => {
|
|
27
|
-
setReady = resolve
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
window.addEventListener('load', () => {
|
|
31
|
-
const safebind = punybind.use({
|
|
32
|
-
compiler: punyexpr
|
|
33
|
-
})
|
|
34
|
-
safebind(document.body).then(setReady)
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
window.report = report
|
|
38
|
-
}())
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* global DecompressionStream */
|
|
2
|
-
/* eslint-disable-next-line no-unused-vars */
|
|
3
|
-
async function decompress (base64) {
|
|
4
|
-
const bin = atob(base64)
|
|
5
|
-
const uint8Array = new Uint8Array(bin.length)
|
|
6
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
7
|
-
uint8Array[i] = bin.charCodeAt(i)
|
|
8
|
-
}
|
|
9
|
-
const readableStream = new ReadableStream({
|
|
10
|
-
start (ctl) {
|
|
11
|
-
ctl.enqueue(uint8Array)
|
|
12
|
-
ctl.close()
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
const decompressionStream = new DecompressionStream('gzip')
|
|
16
|
-
const decompressedStream = readableStream.pipeThrough(decompressionStream)
|
|
17
|
-
const jsonString = await new Response(decompressedStream).text()
|
|
18
|
-
return JSON.parse(jsonString)
|
|
19
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<title>ui5-test-runner</title>
|
|
4
|
-
<link rel="stylesheet" href="/_/report/styles.css">
|
|
5
|
-
<script>window.module = window.module || {}</script>
|
|
6
|
-
<script src="/_/punyexpr.js"></script>
|
|
7
|
-
<script>window.punyexpr = module.exports.punyexpr</script>
|
|
8
|
-
<script src="/_/punybind.js"></script>
|
|
9
|
-
<script src="/_/report/common.js"></script>
|
|
10
|
-
<script src="/_/report/main.js"></script>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div {{if}}="!(qunitPage || qunitTest)">
|
|
14
|
-
<h1>{{ status || 'Test report' }}</h1>
|
|
15
|
-
<div {{if}}="end === undefined" class="elapsed">In progress since {{ elapsed(start) }}</div>
|
|
16
|
-
<div {{else}} class="elapsed">Duration : {{ elapsed(start, end) }} <a href="#" id="download">📦</a></div>
|
|
17
|
-
<div {{if}}="timedOut">
|
|
18
|
-
⏲️ Timed out
|
|
19
|
-
</div>
|
|
20
|
-
<table style="visibility: {{ testPageUrls.length > 0 ? 'visible' : 'hidden' }};">
|
|
21
|
-
<tr>
|
|
22
|
-
<th> </th>
|
|
23
|
-
<th class="count">Type</th>
|
|
24
|
-
<th class="status" style="width: 10rem;"><div><span>Status</span></div></th>
|
|
25
|
-
<th class="count">Tests</th>
|
|
26
|
-
<th class="count">Passed</th>
|
|
27
|
-
<th class="count">Failed</th>
|
|
28
|
-
<th class="elapsed">Elapsed</th>
|
|
29
|
-
</tr>
|
|
30
|
-
<tr {{for}}="url of testPageUrls">
|
|
31
|
-
<td class="truncated">
|
|
32
|
-
<span {{if}}="qunitPages === undefined || !qunitPages[url]">{{ url }}</span>
|
|
33
|
-
<a {{else}} href="#{{ qunitPages[url].id }}">{{ url }}</a>
|
|
34
|
-
</td>
|
|
35
|
-
<td>
|
|
36
|
-
<span {{if}}="!qunitPages[url]">-</span>
|
|
37
|
-
<span {{elseif}}="qunitPages[url].isOpa" title="OPA test">🥼</span>
|
|
38
|
-
<span {{elseif}}="qunitPages[url].start" title="Unit test">🧪</span>
|
|
39
|
-
</td>
|
|
40
|
-
<td>
|
|
41
|
-
<span {{if}}="!qunitPages[url]">-</span>
|
|
42
|
-
<span {{elseif}}="qunitPages[url].failed">❌</span>
|
|
43
|
-
<span {{elseif}}="qunitPages[url].end">✔️</span>
|
|
44
|
-
<span {{if}}="!qunitPages[url].end">
|
|
45
|
-
<progress max="{{ qunitPages[url].count }}" value="{{ qunitPages[url].failed + qunitPages[url].passed }}"></progress>
|
|
46
|
-
</span>
|
|
47
|
-
</td>
|
|
48
|
-
<td>{{ qunitPages[url] ? qunitPages[url].count : '-' }}</td>
|
|
49
|
-
<td>{{ qunitPages[url] ? qunitPages[url].passed : '-' }}</td>
|
|
50
|
-
<td>{{ qunitPages[url] ? qunitPages[url].failed : '-' }}</td>
|
|
51
|
-
<td>
|
|
52
|
-
<span {{if}}="!qunitPages[url]">-</span>
|
|
53
|
-
<span {{elseif}}="qunitPages[url].end === undefined">{{ elapsed(qunitPages[url].start) }}</span>
|
|
54
|
-
<span {{else}}>{{ elapsed(qunitPages[url].start, qunitPages[url].end) }}</span>
|
|
55
|
-
</td>
|
|
56
|
-
</tr>
|
|
57
|
-
</table>
|
|
58
|
-
</div>
|
|
59
|
-
<div {{if}}="qunitPage">
|
|
60
|
-
<h1 class="truncated">{{ qunitPage.url }}</h1>
|
|
61
|
-
<a href="#">⏴ back to report</a>
|
|
62
|
-
<div {{if}}="qunitPage.end === undefined" class="elapsed">In progress since {{ elapsed(qunitPage.start) }}</div>
|
|
63
|
-
<div {{else}} class="elapsed">Duration : {{ elapsed(qunitPage.start, qunitPage.end) }}</div>
|
|
64
|
-
<div {{if}}="timedOut">
|
|
65
|
-
⏲️ Timed out
|
|
66
|
-
</div>
|
|
67
|
-
<div {{for}}="module of qunitPage.modules">
|
|
68
|
-
<h2>{{ module.name }}</h2>
|
|
69
|
-
<div {{for}}="test of module.tests">
|
|
70
|
-
<a {{if}}="!test.skip" href="#{{ qunitPage.id }}-{{ test.testId }}">{{ test.name }}</a>
|
|
71
|
-
<span {{else}}>{{ test.name }}</span>
|
|
72
|
-
<span {{if}}="test.skip">⏸️</span>
|
|
73
|
-
<span {{elseif}}="!test.end" class="elapsed">{{ elapsed(test.start) }}</span>
|
|
74
|
-
<span {{elseif}}="test.report && !test.report.failed">✔️ {{ elapsed(test.start, test.end) }}</span>
|
|
75
|
-
<span {{elseif}}="test.report">❌ {{ elapsed(test.start, test.end) }}</span>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
<div {{elseif}}="qunitTest">
|
|
80
|
-
<h1 class="truncated">{{ qunitTest.url }}</h1>
|
|
81
|
-
<a href="#">⏴ back to report</a>
|
|
82
|
-
<h2>{{ qunitTest.module }}</h2>
|
|
83
|
-
<a href="#{{ qunitTest.pageId }}">⏴ back to page</a>
|
|
84
|
-
<h3>{{ qunitTest.name }}
|
|
85
|
-
<span {{if}}="qunitTest.report && qunitTest.report.passed">✔️</span>
|
|
86
|
-
<span {{elseif}}="qunitTest.report">❌</span>
|
|
87
|
-
</h3>
|
|
88
|
-
<div {{if}}="qunitTest.end === undefined" class="elapsed">In progress since {{ elapsed(qunitTest.start) }}</div>
|
|
89
|
-
<div {{else}} class="elapsed">Duration : {{ elapsed(qunitTest.start, qunitTest.end) }}</div>
|
|
90
|
-
<div {{for}}="log of qunitTest.logs">
|
|
91
|
-
<pre {{if}}="log.result">✔️ {{ log.message }}</pre>
|
|
92
|
-
<pre {{else}}>❌ {{ log.message }}</pre>
|
|
93
|
-
<img {{if}}="log.screenshot" loading="lazy" class="log" src="{{ qunitTest.pageId }}/{{ log.screenshot }}" alt="Copy folder '{{ qunitTest.pageId }}' from the job report">
|
|
94
|
-
</div>
|
|
95
|
-
<img {{if}}="qunitTest.screenshot" loading="lazy" class="log" src="{{ qunitTest.pageId }}/{{ qunitTest.screenshot }}" alt="Copy folder '{{ qunitTest.pageId }}' from the job report">
|
|
96
|
-
</div>
|
|
97
|
-
<div style="display: {{ disconnected ? 'block' : 'none' }};">❌ Disconnected</div>
|
|
98
|
-
</body>
|
|
99
|
-
</html>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/* global report, job */
|
|
2
|
-
report.ready.then(update => {
|
|
3
|
-
const hashChange = hash => {
|
|
4
|
-
const [, pageId, testId] = (hash || '').match(/#?([^-]*)(?:-(.*))?/)
|
|
5
|
-
let [qunitPage, qunitTest] = [null, null]
|
|
6
|
-
if (pageId) {
|
|
7
|
-
const url = Object.keys(job.qunitPages).find(pageUrl => job.qunitPages[pageUrl].id === pageId)
|
|
8
|
-
if (!url) {
|
|
9
|
-
return
|
|
10
|
-
}
|
|
11
|
-
qunitPage = { url, ...job.qunitPages[url] }
|
|
12
|
-
if (testId) {
|
|
13
|
-
let test
|
|
14
|
-
let moduleName
|
|
15
|
-
qunitPage.modules.every(module => module.tests.every(candidate => {
|
|
16
|
-
if (candidate.testId === testId) {
|
|
17
|
-
moduleName = module.name
|
|
18
|
-
test = candidate
|
|
19
|
-
return false
|
|
20
|
-
}
|
|
21
|
-
return true
|
|
22
|
-
}))
|
|
23
|
-
qunitPage = null
|
|
24
|
-
if (test) {
|
|
25
|
-
qunitTest = {
|
|
26
|
-
url,
|
|
27
|
-
pageId,
|
|
28
|
-
module: moduleName,
|
|
29
|
-
...test
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
update({
|
|
35
|
-
...job,
|
|
36
|
-
qunitPage,
|
|
37
|
-
qunitTest,
|
|
38
|
-
elapsed: report.elapsed
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
window.addEventListener('hashchange', () => {
|
|
43
|
-
hashChange(location.hash)
|
|
44
|
-
})
|
|
45
|
-
if (window.location.href === 'about:srcdoc') {
|
|
46
|
-
window.addEventListener('click', (event) => {
|
|
47
|
-
const { href } = event.target
|
|
48
|
-
if (href) {
|
|
49
|
-
const lastHash = href.lastIndexOf('#')
|
|
50
|
-
hashChange(href.substring(lastHash))
|
|
51
|
-
}
|
|
52
|
-
event.preventDefault()
|
|
53
|
-
return false
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
hashChange(location.hash)
|
|
57
|
-
|
|
58
|
-
window.addEventListener('click', (event) => {
|
|
59
|
-
if (event.target.id === 'download') {
|
|
60
|
-
const link = this.document.createElement('a')
|
|
61
|
-
const blob = new Blob([JSON.stringify(job)], {
|
|
62
|
-
type: 'application/json'
|
|
63
|
-
})
|
|
64
|
-
link.setAttribute('href', URL.createObjectURL(blob))
|
|
65
|
-
link.setAttribute('download', 'ui5-test-runner-job.json')
|
|
66
|
-
link.click()
|
|
67
|
-
}
|
|
68
|
-
})
|
|
69
|
-
})
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
/* global report */
|
|
3
|
-
|
|
4
|
-
report.ready.then(update => {
|
|
5
|
-
let lastState = {}
|
|
6
|
-
|
|
7
|
-
async function retry () {
|
|
8
|
-
try {
|
|
9
|
-
await fetch('/_/progress', { method: 'INFO' })
|
|
10
|
-
location.hash = ''
|
|
11
|
-
refresh()
|
|
12
|
-
} catch (e) {
|
|
13
|
-
setTimeout(retry, 250)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async function refresh () {
|
|
18
|
-
const [, page, test] = location.hash.match(/#?([^-]*)(?:-(.*))?/)
|
|
19
|
-
let url = '/_/progress'
|
|
20
|
-
if (page) {
|
|
21
|
-
url += `?page=${page}`
|
|
22
|
-
if (test) {
|
|
23
|
-
url += `&test=${test}`
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
let json
|
|
27
|
-
try {
|
|
28
|
-
const response = await fetch(url)
|
|
29
|
-
json = await response.json()
|
|
30
|
-
} catch (e) {
|
|
31
|
-
update({
|
|
32
|
-
...lastState,
|
|
33
|
-
disconnected: true
|
|
34
|
-
})
|
|
35
|
-
retry()
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
if (test) {
|
|
39
|
-
lastState = {
|
|
40
|
-
qunitTest: json
|
|
41
|
-
}
|
|
42
|
-
} else if (page) {
|
|
43
|
-
lastState = {
|
|
44
|
-
qunitPage: json
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
lastState = {
|
|
48
|
-
...json
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
update({
|
|
52
|
-
...lastState,
|
|
53
|
-
disconnected: false,
|
|
54
|
-
elapsed: report.elapsed
|
|
55
|
-
})
|
|
56
|
-
setTimeout(refresh, 250)
|
|
57
|
-
}
|
|
58
|
-
refresh()
|
|
59
|
-
})
|
|
60
|
-
}())
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
body {
|
|
2
|
-
font-family: "Segoe UI", Arial, sans-serif;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
h1 {
|
|
6
|
-
margin-bottom: 0;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
h2 {
|
|
10
|
-
margin-bottom: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
h3 {
|
|
14
|
-
margin-bottom: 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
progress {
|
|
18
|
-
width: 5rem;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
th {
|
|
22
|
-
text-align: left;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
th.count {
|
|
26
|
-
width: 5rem;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
th.elapsed {
|
|
30
|
-
width: 6rem;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
th.status {
|
|
34
|
-
width: 10rem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
a, a:hover {
|
|
38
|
-
color: black;
|
|
39
|
-
text-decoration: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
a:hover {
|
|
43
|
-
text-decoration: underline;
|
|
44
|
-
text-decoration-style: dotted;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
table {
|
|
48
|
-
table-layout: fixed;
|
|
49
|
-
width: 100%;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.truncated {
|
|
53
|
-
overflow: hidden;
|
|
54
|
-
text-overflow: ellipsis;
|
|
55
|
-
white-space: nowrap;
|
|
56
|
-
direction: rtl;
|
|
57
|
-
text-align: left;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
img.log {
|
|
61
|
-
width: 50%;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
img.log:hover {
|
|
65
|
-
width: unset;
|
|
66
|
-
}
|