-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Expand file tree
/
Copy pathbase_url_spec.js
More file actions
87 lines (78 loc) · 1.64 KB
/
base_url_spec.js
File metadata and controls
87 lines (78 loc) · 1.64 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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
const systemTests = require('../lib/system-tests').default
const onServer = (app) => {
return app.get('/app/html', (req, res) => {
return res.send('<html>Herman Melville</html>')
})
}
describe('e2e baseUrl', () => {
context('https', () => {
systemTests.setup({
servers: {
port: 443,
https: true,
onServer,
},
settings: {
e2e: {
allowCypressEnv: false,
baseUrl: 'https://localhost/app',
},
},
})
systemTests.it('passes', {
spec: 'base_url.cy.js',
snapshot: true,
})
})
context('https basic auth', () => {
systemTests.setup({
servers: {
port: 443,
https: true,
onServer,
},
settings: {
e2e: {
allowCypressEnv: false,
baseUrl: 'https://test:test@localhost/app',
},
},
})
systemTests.it('passes', {
spec: 'base_url.cy.js',
browser: 'chrome',
snapshot: true,
})
})
// https://github.com/cypress-io/cypress/issues/28336
context('basic auth + privileged commands', () => {
systemTests.setup({
servers: {
port: 9999,
onServer,
},
})
systemTests.it('passes', {
browser: 'chrome',
project: 'privileged-commands',
})
})
context('http', () => {
systemTests.setup({
servers: {
port: 9999,
onServer,
},
settings: {
e2e: {
allowCypressEnv: false,
baseUrl: 'http://localhost:9999/app',
},
},
})
systemTests.it('passes', {
spec: 'base_url.cy.js',
snapshot: true,
})
})
})