diff options
author | Mario <mario@mariovavti.com> | 2020-01-09 13:34:37 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-01-09 13:34:37 +0000 |
commit | 537a7cf03d6ee86465f8aca761653606741d3658 (patch) | |
tree | 61a961105de3f4f37bf6159e79c77b0780b5f8bc /vendor/blueimp/jquery-file-upload/wdio/hooks | |
parent | 662e8f8a4c67e9a7de579ff93f4c36ae2006e186 (diff) | |
download | volse-hubzilla-537a7cf03d6ee86465f8aca761653606741d3658.tar.gz volse-hubzilla-537a7cf03d6ee86465f8aca761653606741d3658.tar.bz2 volse-hubzilla-537a7cf03d6ee86465f8aca761653606741d3658.zip |
composer updates
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/wdio/hooks')
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/hooks/index.js | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js index 9ce5c52fd..2f0dcd3f6 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js +++ b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js @@ -1,21 +1,27 @@ 'use strict' -/* global browser */ +/* global browser, Promise */ const cmds = require('wdio-screen-commands') -module.exports = { - before: () => { - global.should = require('chai').should() +/* eslint-disable jsdoc/valid-types */ +/** @type WebdriverIO.Config */ +const config = { + before: async () => { + global.Should = require('chai').should() browser.addCommand('saveScreenshotByName', cmds.saveScreenshotByName) browser.addCommand('saveAndDiffScreenshot', cmds.saveAndDiffScreenshot) - if (browser.config.maximizeWindow) browser.maximizeWindow() + if (browser.config.maximizeWindow) await browser.maximizeWindow() }, - beforeTest: test => { - cmds.startScreenRecording(test) + beforeTest: async test => { + await cmds.startScreenRecording(test) }, afterTest: async test => { - await cmds.stopScreenRecording(test) - cmds.saveScreenshotByTest(test) + await Promise.all([ + cmds.stopScreenRecording(test), + cmds.saveScreenshotByTest(test) + ]) } } + +module.exports = config |