]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/e2e/wdio.local-test.conf.ts
More robust runner update handler
[github/Chocobozzz/PeerTube.git] / client / e2e / wdio.local-test.conf.ts
CommitLineData
3cf68b86 1import { afterLocalSuite, beforeLocalSuite, beforeLocalSession } from './src/utils'
6d210220
C
2import { config as mainConfig } from './wdio.main.conf'
3
4const prefs = {
5 'intl.accept_languages': 'en'
6}
7
450de91e
C
8// Chrome headless does not support prefs
9process.env.LANG = 'en'
10
5b94394a
C
11// https://github.com/mozilla/geckodriver/issues/1354#issuecomment-479456411
12process.env.MOZ_HEADLESS_WIDTH = '1280'
13process.env.MOZ_HEADLESS_HEIGHT = '1024'
14
15const windowSizeArg = `--window-size=${process.env.MOZ_HEADLESS_WIDTH},${process.env.MOZ_HEADLESS_HEIGHT}`
16
6d210220
C
17module.exports = {
18 config: {
19 ...mainConfig,
20
21 runner: 'local',
22
23 maxInstances: 1,
24 specFileRetries: 0,
25
26 capabilities: [
27 {
d0fbc9fd
C
28 'browserName': 'chrome',
29 'acceptInsecureCerts': true,
6d210220 30 'goog:chromeOptions': {
5b94394a
C
31 args: [ '--disable-gpu', windowSizeArg ],
32 prefs
33 }
34 },
35 {
d0fbc9fd 36 'browserName': 'firefox',
5b94394a
C
37 'moz:firefoxOptions': {
38 binary: '/usr/bin/firefox-developer-edition',
39 args: [ '--headless', windowSizeArg ],
40
6d210220
C
41 prefs
42 }
43 }
44 ],
45
5bdfa604 46 services: [ 'chromedriver', 'geckodriver', 'shared-store' ],
3cf68b86
C
47
48 beforeSession: beforeLocalSession,
49 beforeSuite: beforeLocalSuite,
50 afterSuite: afterLocalSuite
6d210220
C
51 } as WebdriverIO.Config
52}