Skip to content

Commit c0ca45c

Browse files
committed
test: run cypress in headless mode only when in CI env
Some issues only happens in GUI mode (vuejs#2672), so we need to manually identify these issues during development.
1 parent 35e8d83 commit c0ca45c

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

packages/@vue/cli-plugin-e2e-cypress/__tests__/cypressPlugin.spec.js

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,24 @@ jest.setTimeout(process.env.APPVEYOR ? 80000 : 60000)
22

33
const create = require('@vue/cli-test-utils/createTestProject')
44

5-
// temporarily disabled on AppVeyor due to upstream issue
6-
// https://github.com/cypress-io/cypress/issues/1841
7-
if (!process.env.APPVEYOR) {
8-
test('should work', async () => {
9-
const project = await create('e2e-cypress', {
10-
plugins: {
11-
'@vue/cli-plugin-babel': {},
12-
'@vue/cli-plugin-e2e-cypress': {}
13-
}
14-
})
5+
test('should work', async () => {
6+
const project = await create('e2e-cypress', {
7+
plugins: {
8+
'@vue/cli-plugin-babel': {},
9+
'@vue/cli-plugin-e2e-cypress': {}
10+
}
11+
})
1512

16-
const pkg = JSON.parse(await project.read('package.json'))
17-
expect(pkg.devDependencies).toHaveProperty('@cypress/webpack-preprocessor')
13+
const pkg = JSON.parse(await project.read('package.json'))
14+
expect(pkg.devDependencies).toHaveProperty('@cypress/webpack-preprocessor')
1815

19-
const config = JSON.parse(await project.read('cypress.json'))
20-
config.video = false
21-
await project.write('cypress.json', JSON.stringify(config))
16+
const config = JSON.parse(await project.read('cypress.json'))
17+
config.video = false
18+
await project.write('cypress.json', JSON.stringify(config))
2219

20+
if (process.env.CI) {
2321
await project.run(`vue-cli-service test:e2e --headless`)
24-
})
25-
} else {
26-
test('should work', () => {
27-
// empty spec to avoid jest bailing
28-
})
29-
}
22+
} else {
23+
await project.run(`vue-cli-service test:e2e`)
24+
}
25+
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy