fediplan/public/js/jQuery-File-Upload-10.1.0/wdio/hooks/index.js
2019-08-09 13:55:27 +02:00

21 lines
560 B
JavaScript

'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)
}
}