MCPcopy Create free account
hub / github.com/webdriverio/webdriverio / onJobComplete

Method onJobComplete

packages/wdio-cli/src/interface.ts:143–167  ·  view source on GitHub ↗
(cid: string, job?: Workers.Job, retries = 0, message = '', _logger: Function = this.log)

Source from the content-addressed store, hash-verified

141 }
142
143 onJobComplete(cid: string, job?: Workers.Job, retries = 0, message = '', _logger: Function = this.log) {
144 const details = [`[${cid}]`, message]
145 if (job) {
146 const caps = job.caps
147 const version = caps?.browserVersion || caps?.['appium:platformVersion']
148 const runnerName = getRunnerName(caps)
149
150 if (version) {
151 details.push('in', `${runnerName}(${version})`)
152 } else {
153 details.push('in', runnerName)
154 }
155
156 if (caps?.platformName || caps?.['appium:deviceName']) {
157 details.push('on', (caps?.platformName || caps?.['appium:deviceName']) as string)
158 }
159
160 details.push(this.getFilenames(job.specs))
161 }
162 if (retries > 0) {
163 details.push(`(${retries} retries)`)
164 }
165
166 return _logger(...details)
167 }
168
169 onTestError(payload: CLIInterfaceEvent) {
170 const error: TestError = {

Callers 6

onSpecRunningMethod · 0.95
onSpecRetryMethod · 0.95
onSpecPassMethod · 0.95
onSpecFailureMethod · 0.95
onSpecSkipMethod · 0.95
interface.test.tsFile · 0.80

Calls 2

getFilenamesMethod · 0.95
getRunnerNameFunction · 0.85

Tested by

no test coverage detected