forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci_environments_spec.ts
41 lines (35 loc) · 954 Bytes
/
ci_environments_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, { ItOptions } from '../lib/system-tests'
function smokeTestDockerImage (title: string, dockerImage: string, expectedExitCode: number, onRun?: ItOptions['onRun']) {
systemTests.it(title, {
withBinary: true,
browser: 'electron',
dockerImage,
spec: 'test1.js',
specDir: 'tests',
project: 'todos',
expectedExitCode,
onRun,
})
}
describe('e2e binary CI environments', () => {
smokeTestDockerImage(
'bare node image fails (lacks xvfb)',
'node:12', 1,
async (exec) => {
const { stdout } = await exec()
expect(stdout).to.include('Your system is missing the dependency: Xvfb')
},
)
smokeTestDockerImage(
'bare xvfb image fails',
'cypressinternal/xvfb:12.13.0', 1,
)
smokeTestDockerImage(
'ubuntu 16 passes',
'cypress/base:ubuntu16-12.13.1', 0,
)
smokeTestDockerImage(
'ubuntu 19 passes',
'cypress/base:ubuntu19-node12.14.1', 0,
)
})