aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/utils/hooks.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-02-15 16:25:52 +0100
committerChocobozzz <me@florianbigard.com>2023-02-15 16:26:21 +0100
commit1ec4835dcac769d0711bbfeaa63b4e1743fde265 (patch)
treec50faa5a51ebe4827d2762e6b7b4f418da2a9948 /client/e2e/src/utils/hooks.ts
parent366d5aea5d5b320b54b9cfea9a646d7828de7bae (diff)
downloadPeerTube-1ec4835dcac769d0711bbfeaa63b4e1743fde265.tar.gz
PeerTube-1ec4835dcac769d0711bbfeaa63b4e1743fde265.tar.zst
PeerTube-1ec4835dcac769d0711bbfeaa63b4e1743fde265.zip
Create screenshots directory when needed
Diffstat (limited to 'client/e2e/src/utils/hooks.ts')
-rw-r--r--client/e2e/src/utils/hooks.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/e2e/src/utils/hooks.ts b/client/e2e/src/utils/hooks.ts
index 7fe247681..8baf9fb44 100644
--- a/client/e2e/src/utils/hooks.ts
+++ b/client/e2e/src/utils/hooks.ts
@@ -1,7 +1,8 @@
1import { ChildProcessWithoutNullStreams } from 'child_process' 1import { ChildProcessWithoutNullStreams } from 'child_process'
2import { basename } from 'path' 2import { basename } from 'path'
3import { runCommand, runServer } from './server'
4import { setValue } from '@wdio/shared-store-service' 3import { setValue } from '@wdio/shared-store-service'
4import { createScreenshotsDirectory } from './files'
5import { runCommand, runServer } from './server'
5 6
6let appInstance: number 7let appInstance: number
7let app: ChildProcessWithoutNullStreams 8let app: ChildProcessWithoutNullStreams
@@ -21,6 +22,8 @@ function afterLocalSuite () {
21} 22}
22 23
23async function beforeLocalSession (config: { baseUrl: string }, capabilities: { browserName: string }) { 24async function beforeLocalSession (config: { baseUrl: string }, capabilities: { browserName: string }) {
25 await createScreenshotsDirectory()
26
24 appInstance = capabilities['browserName'] === 'chrome' 27 appInstance = capabilities['browserName'] === 'chrome'
25 ? 1 28 ? 1
26 : 2 29 : 2