forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin_run_events_spec.ts
41 lines (36 loc) · 1.15 KB
/
plugin_run_events_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
import systemTests from '../lib/system-tests'
describe('e2e plugin run events', () => {
systemTests.setup()
systemTests.it('sends events', {
browser: 'electron',
project: 'plugin-run-events',
snapshot: true,
config: {
video: false,
},
})
systemTests.it('handles async before:spec', {
browser: 'electron',
project: 'plugin-run-events',
snapshot: true,
configFile: 'cypress.config.beforeSpec.async.js',
})
systemTests.it('handles video being deleted in after:spec', {
browser: 'electron',
project: 'plugin-run-events',
spec: '*1.cy.js',
configFile: 'cypress.config.afterSpec.deleteVideo.js',
snapshot: true,
})
systemTests.it('fails run if event handler throws', {
browser: 'electron',
project: 'plugin-run-events',
snapshot: true,
expectedExitCode: 1,
configFile: 'cypress.config.runEvent.throws.js',
onStdout: (stdout) => {
// TODO: Figure out how to fix the race condition on thrown exceptions in before:spec that causes additional electron exceptions to fire: https://github.com/cypress-io/cypress/issues/24102
return stdout.trimRight()
},
})
})