commit vendor
This commit is contained in:
26
vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
vendored
Normal file
26
vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
'use strict'
|
||||
|
||||
/* global browser, Promise */
|
||||
|
||||
const cmds = require('wdio-screen-commands')
|
||||
|
||||
/* eslint-disable jsdoc/valid-types */
|
||||
/** @type WebdriverIO.HookFunctions */
|
||||
const config = {
|
||||
before: async () => {
|
||||
browser.addCommand('saveScreenshotByName', cmds.saveScreenshotByName)
|
||||
browser.addCommand('saveAndDiffScreenshot', cmds.saveAndDiffScreenshot)
|
||||
if (browser.config.maximizeWindow) await browser.maximizeWindow()
|
||||
},
|
||||
beforeTest: async test => {
|
||||
await cmds.startScreenRecording(test)
|
||||
},
|
||||
afterTest: async (test, context, result) => {
|
||||
await Promise.all([
|
||||
cmds.stopScreenRecording(test, result),
|
||||
cmds.saveScreenshotByTest(test, result)
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = config
|
||||
Reference in New Issue
Block a user