forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbefore_browser_launch_spec.ts
43 lines (39 loc) · 1.1 KB
/
before_browser_launch_spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import Fixtures from '../lib/fixtures'
import systemTests from '../lib/system-tests'
import browserUtils from '@packages/server/lib/browsers/utils'
const browser = {
name: 'chrome',
channel: 'stable',
}
const isTextTerminal = true // we're always in run mode
const PATH_TO_CHROME_PROFILE = browserUtils.getProfileDir(browser, isTextTerminal)
describe('e2e before:browser:launch', () => {
systemTests.setup()
systemTests.it('modifies preferences on disk if DNE', {
browser: 'chrome',
config: {
video: false,
env: {
PATH_TO_CHROME_PROFILE,
},
},
project: 'chrome-browser-preferences',
snapshot: true,
spec: 'spec.cy.js',
})
systemTests.it('can add extensions', {
browser: '!webkit', // TODO(webkit): fix+unskip, or skip and add a test that this fails with WebKit
spec: 'spec.cy.js',
config: {
video: false,
},
headed: true,
project: 'browser-extensions',
sanitizeScreenshotDimensions: true,
snapshot: true,
onRun: async (exec) => {
await Fixtures.scaffoldProject('plugin-extension')
await exec()
},
})
})