aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2020-01-14 13:34:56 -0800
committerzotlabs <mike@macgirvin.com>2020-01-14 13:34:56 -0800
commit293d411efb28b8f20a0208e3c52883e9fbb8cea7 (patch)
treea8b0af66015815d56342daf8301ab5ae095eda0a /vendor/blueimp/jquery-file-upload/wdio/hooks/index.js
parent2a287e6def5ab54037222c963ab0875faf62fc1a (diff)
parentd96f4340e80207a29a5c1c49cae8c25e3934d5ae (diff)
downloadvolse-hubzilla-293d411efb28b8f20a0208e3c52883e9fbb8cea7.tar.gz
volse-hubzilla-293d411efb28b8f20a0208e3c52883e9fbb8cea7.tar.bz2
volse-hubzilla-293d411efb28b8f20a0208e3c52883e9fbb8cea7.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/wdio/hooks/index.js')
-rw-r--r--vendor/blueimp/jquery-file-upload/wdio/hooks/index.js24
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