diff options
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/wdio/hooks/index.js')
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/hooks/index.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js new file mode 100644 index 000000000..9ce5c52fd --- /dev/null +++ b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js @@ -0,0 +1,21 @@ +'use strict' + +/* global browser */ + +const cmds = require('wdio-screen-commands') + +module.exports = { + before: () => { + global.should = require('chai').should() + browser.addCommand('saveScreenshotByName', cmds.saveScreenshotByName) + browser.addCommand('saveAndDiffScreenshot', cmds.saveAndDiffScreenshot) + if (browser.config.maximizeWindow) browser.maximizeWindow() + }, + beforeTest: test => { + cmds.startScreenRecording(test) + }, + afterTest: async test => { + await cmds.stopScreenRecording(test) + cmds.saveScreenshotByTest(test) + } +} |