-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Expand file tree
/
Copy pathplugin_run_events_spec.ts
More file actions
38 lines (33 loc) · 1.11 KB
/
plugin_run_events_spec.ts
File metadata and controls
38 lines (33 loc) · 1.11 KB
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
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,
})
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()
},
})
})