forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowser_crash_handling_spec.js
49 lines (44 loc) · 1.39 KB
/
browser_crash_handling_spec.js
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
44
45
46
47
48
49
const systemTests = require('../lib/system-tests').default
describe('Browser Crash Handling', () => {
systemTests.setup({
settings: {
e2e: {},
},
})
// It should fail the chrome_tab_crash spec, but the simple spec should run and succeed
context('when the tab crashes in chrome', () => {
systemTests.it('fails', {
browser: 'chrome',
spec: 'chrome_tab_crash.cy.js,simple.cy.js',
snapshot: true,
expectedExitCode: 1,
})
})
// It should fail the chrome_tab_crash spec, but the simple spec should run and succeed
context('when the tab crashes in electron', () => {
systemTests.it('fails', {
browser: 'electron',
spec: 'chrome_tab_crash.cy.js,simple.cy.js',
snapshot: true,
expectedExitCode: 1,
})
})
// It should fail the chrome_tab_crash spec, but the simple spec should run and succeed
context('when the browser process crashes in chrome', () => {
systemTests.it('fails', {
browser: 'chrome',
spec: 'chrome_process_crash.cy.js,simple.cy.js',
snapshot: true,
expectedExitCode: 1,
})
})
// If chrome crashes, all of cypress crashes when in electron
context('when the browser process crashes in electron', () => {
systemTests.it('fails', {
browser: 'electron',
spec: 'chrome_process_crash.cy.js,simple.cy.js',
snapshot: true,
expectedExitCode: 1,
})
})
})