forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspecs_spec.js
73 lines (64 loc) · 2.04 KB
/
specs_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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const systemTests = require('../lib/system-tests').default
describe('e2e specs', () => {
systemTests.setup()
it('failing when no specs found and default specPattern', function () {
return systemTests.exec(this, {
project: 'no-specs',
snapshot: true,
expectedExitCode: 1,
})
})
it('failing when no specs found and custom specPattern', function () {
return systemTests.exec(this, {
project: 'no-specs-custom-pattern',
snapshot: true,
expectedExitCode: 1,
})
})
it('failing when no specs found and spec pattern provided from CLI', function () {
return systemTests.exec(this, {
project: 'no-specs',
spec: 'does/not/exist/**notfound**',
snapshot: true,
expectedExitCode: 1,
})
})
it('failing when no specs found with custom spec pattern and spec pattern provided from CLI', function () {
return systemTests.exec(this, {
project: 'no-specs-custom-pattern',
spec: 'does/not/exist/**notfound**',
snapshot: true,
expectedExitCode: 1,
})
})
// @see https://github.com/cypress-io/cypress/issues/14226
it('handles the same integration and fixtures folders', function () {
return systemTests.exec(this, {
project: 'same-fixtures-integration-folders',
snapshot: false,
expectedExitCode: 0,
})
})
it('handles the fixtures folder being the subfolder of integration', function () {
return systemTests.exec(this, {
project: 'fixture-subfolder-of-integration',
snapshot: false,
expectedExitCode: 0,
})
})
it('handles specs with special characters in the file name', function () {
return systemTests.exec(this, {
project: 'spec-name-special-characters',
snapshot: false,
expectedExitCode: 0,
})
})
it('handles glob characters in the working directory and spec pattern provided from CLI', function () {
return systemTests.exec(this, {
project: 'project-with-(glob)-[chars]',
spec: '**/*.cy.js',
snapshot: true,
expectedExitCode: 0,
})
})
})