Skip to content

Commit 2b855cc

Browse files
Merge pull request #404 from cypress-io/develop
Develop
2 parents b2dda42 + 9e7815e commit 2b855cc

File tree

5 files changed

+125
-93
lines changed

5 files changed

+125
-93
lines changed

package-lock.json

Lines changed: 60 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.0",
44
"private": true,
55
"hexo": {
6-
"version": "3.4.4"
6+
"version": "3.5.0"
77
},
88
"engines": {
99
"node": "^8.4.0"
@@ -103,7 +103,7 @@
103103
"lazy-ass": "^1.6.0",
104104
"lodash": "4.17.4",
105105
"lunr": "2.1.5",
106-
"menuspy": "1.2.1",
106+
"menuspy": "1.3.0",
107107
"scrollingelement": "1.5.2"
108108
}
109-
}
109+
}

source/_data/plugins.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,33 @@
55
link: https://github.com/cypress-io/cypress-browserify-preprocessor
66
keywords: [browserify]
77

8-
- name: Webpack
9-
description: Watches and bundles your spec files via webpack.
10-
link: https://github.com/cypress-io/cypress-webpack-preprocessor
11-
keywords: [webpack]
8+
- name: Cucumber
9+
description: Run cucumber/gherkin-syntaxed specs with cypress.io
10+
link: https://github.com/TheBrainFamily/cypress-cucumber-preprocessor
11+
keywords: [file-watcher, cucumber]
1212

1313
- name: Watch
1414
description: Watches your spec files and serves them as-is. Useful as an example reference or if you don't need transpiling/bundling.
1515
link: https://github.com/cypress-io/cypress-watch-preprocessor
1616
keywords: [file-watcher]
1717

18+
- name: Webpack
19+
description: Watches and bundles your spec files via webpack.
20+
link: https://github.com/cypress-io/cypress-webpack-preprocessor
21+
keywords: [webpack]
22+
23+
1824
- name: Development Tools
1925
plugins:
20-
- name: ESLint
21-
description: ESLint plugin that sets globals for writing tests in Cypress.
22-
link: https://github.com/cypress-io/eslint-plugin-cypress
23-
keywords: [eslint]
24-
2526
- name: Docker
2627
description: Docker images providing all the dependencies to run Cypress in CI including browsers.
2728
link: https://github.com/cypress-io/cypress-docker-images
2829
keywords: [docker, continuous-integration]
30+
31+
- name: ESLint
32+
description: ESLint plugin that sets globals for writing tests in Cypress.
33+
link: https://github.com/cypress-io/eslint-plugin-cypress
34+
keywords: [eslint]
2935

3036
- name: TypeScript
3137
description: Official TypeScript definitions for the Cypress API.

source/api/cypress-api/dom.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Cypress.dom.isHidden(element)
2828
Cypress internally uses this method *everywhere* to figure out whether an element is hidden, {% url "mostly for actionability" interacting-with-elements %}.
2929

3030
```javascript
31-
const $el = $("#modal")
32-
33-
Cypress.dom.isHidden($el) // => false
31+
cy.get('p').then(($el) => {
32+
Cypress.dom.isHidden($el) // false
33+
})
3434
```

source/guides/guides/continuous-integration.md

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,60 @@ Depending on which CI provider you use, you may need a config file. You'll want
4848
***Example `.travis.yml` config file***
4949

5050
```yaml
51+
language: node_js
52+
node_js:
53+
- 6
54+
cache:
55+
directories:
56+
- ~/.npm
57+
- node_modules
58+
install:
59+
- npm install
5160
script:
52-
- cypress run --record
61+
- $(npm bin)/cypress run --record
5362
```
5463
64+
Caching folders with NPM modules saves a lot of time after the first build.
65+
5566
## CircleCI
5667
57-
***Example `circle.yml` config file***
68+
***Example `circle.yml` v1 config file***
5869

5970
```yaml
71+
machine:
72+
node:
73+
version: 6
74+
dependencies:
75+
cache_directories:
76+
- ~/.npm
77+
- node_modules
78+
pre:
79+
- npm install
6080
test:
6181
override:
62-
- cypress run --record
82+
- $(npm bin)/cypress run --record
83+
```
84+
85+
***Example `circle.yml` v2 config file***
86+
87+
```yaml
88+
version: 2
89+
jobs:
90+
build:
91+
docker:
92+
- image: cypress/base:6
93+
environment:
94+
## this enables colors in the output
95+
TERM: xterm
96+
working_directory: ~/app
97+
steps:
98+
- checkout
99+
- run: npm install
100+
- run: $(npm bin)/cypress run --record
63101
```
64102

103+
Find the complete CircleCI v2 example with caching and artifact upload in [cypress-example-docker-circle](https://github.com/cypress-io/cypress-example-docker-circle) repo.
104+
65105
## Docker
66106

67107
We have {% url 'created' https://github.com/cypress-io/cypress-docker-images %} an official {% url 'cypress/base' 'https://hub.docker.com/r/cypress/base/' %} container with all of the required dependencies installed. Just add Cypress and go! We are also adding images with browsers pre-installed under {% url 'cypress/browsers' 'https://hub.docker.com/r/cypress/browsers/' %} name. A typical Dockerfile would look like this:
@@ -223,27 +263,7 @@ However, if you're running this script locally you'll have to do a bit more work
223263

224264
### Helpers
225265

226-
There are two little utilities we recommend to start the server, run the tests and then shutdown the server. The first is {% url npm-run-all https://github.com/mysticatea/npm-run-all %}.
227-
228-
```shell
229-
npm install --save-dev npm-run-all
230-
```
231-
232-
Set the test script command in your package file to use {% url run-p https://github.com/mysticatea/npm-run-all/blob/master/docs/run-p.md %} command.
233-
234-
```json
235-
{
236-
"scripts": {
237-
"start": "my-server",
238-
"cy:run": "cypress run",
239-
"test": "run-p --race start cy:run"
240-
}
241-
}
242-
```
243-
244-
From your terminal and on CI now simply run `npm test` and the server will be closed after the tests finish.
245-
246-
If the server takes a very long time to start and Cypress times out at first, we recommend using {% url start-server-and-test https://github.com/bahmutov/start-server-and-test %} utility.
266+
If the server takes a very long time to start, and Cypress times out while loading the page, we recommend using {% url start-server-and-test https://github.com/bahmutov/start-server-and-test %} utility.
247267

248268
```shell
249269
npm install --save-dev start-server-and-test

0 commit comments

Comments
 (0)