mirror of
https://framagit.org/tom79/fediplan.git
synced 2025-04-06 14:11:49 +02:00
22 lines
560 B
JavaScript
22 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)
|
||
|
}
|
||
|
}
|