mirror of
https://framagit.org/tom79/fediplan.git
synced 2025-04-05 21:51:50 +02:00
21 lines
560 B
JavaScript
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)
|
|
}
|
|
}
|