Merge branch 'master' into pln/docs-index

# Conflicts:
#	docs/package.json
#	docs/source/_data/menu.yml
#	docs/themes/cypress/languages/en.yml
This commit is contained in:
Loren Norman
2017-05-18 10:34:09 -04:00
20 changed files with 62 additions and 48 deletions

View File

@@ -8,6 +8,9 @@ dependencies:
cache_directories:
# downloaded Electron binary
- "~/.electron"
# downloaded Cypress binary
- "~/.cypress"
# docs folder needs modules and Cypress binary
- docs/node_modules
# could not use wildcard format, so list every subfolder
- packages/coffee/node_modules
@@ -23,6 +26,7 @@ dependencies:
- packages/server/node_modules
- packages/socket/node_modules
- packages/static/node_modules
- packages/ts/node_modules
test:
## e2e (1)
@@ -40,13 +44,11 @@ test:
#
# things to run in the 1st CI container
#
# build docs site (fast)
- if [ $CIRCLE_NODE_INDEX == 0 ]; then cd docs && npm install; fi:
parallel: true
# run linter (fast)
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all lint; fi:
parallel: true
# run unit tests (fast)
# separate commands for better GUI view
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package coffee; fi:
@@ -82,9 +84,14 @@ test:
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test -- --package static; fi:
parallel: true
- if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test-integration-once -- --package server; fi:
# run E2E tests against docs site (reasonably fast)
- if [ $CIRCLE_NODE_INDEX == 0 ]; then cd docs && npm run test-e2e; fi:
parallel: true
## temporarily commenting out until these all pass locally
# - if [ $CIRCLE_NODE_INDEX == 0 ]; then npm run all test-integration-once -- --package server; fi:
# parallel: true
#
# things to run in the 2nd CI container
#
@@ -94,8 +101,9 @@ test:
#
# things to run in the 3rd CI container
#
- if [ $CIRCLE_NODE_INDEX == 2 ]; then npm run all test-e2e-once -- --package server; fi:
parallel: true
## temporarily commenting out until these all pass locally
# - if [ $CIRCLE_NODE_INDEX == 2 ]; then npm run all test-e2e-once -- --package server; fi:
# parallel: true
# Example project E2E tests
# Hanging now, so commented out

View File

@@ -17,8 +17,11 @@ const packageNameFromPath = (fullPath) => {
.replace('packages/', '')
}
const nonPackageDirs = ['docs/']
const getDirs = () => {
return globAsync('packages/*/')
.then((dirs) => dirs.concat(nonPackageDirs))
.map((dir) => path.join(process.cwd(), dir).replace(/\/$/, ''))
}

2
docs/.gitignore vendored
View File

@@ -5,3 +5,5 @@ node_modules
public
db.json
.deploy*/
cypress/screenshots
cypress/videos

View File

@@ -1,19 +0,0 @@
general:
branches:
ignore:
- gh-pages
machine:
node:
version: 6.5.0
dependencies:
post:
- npm install -g cypress-cli
test:
pre:
- npm start:
background: true
override:
- cypress run --record

View File

@@ -58,9 +58,9 @@ describe "Documentation", ->
it "displays algolia dropdown on search", ->
cy
.get(".aa-dropdown-menu").should("not.be.visible")
.get(".ds-dropdown-menu").should("not.be.visible")
.get("#search-input").type("g")
.get(".aa-dropdown-menu").should("be.visible")
.get(".ds-dropdown-menu").should("be.visible")
describe "Guides & API", ->
beforeEach ->

View File

@@ -15,7 +15,11 @@
"convert": "node ./cy_scripts/convert.js",
"deploy": "npm run build && hexo deploy",
"build-prod": "hexo clean && hexo generate && gulp prep",
"start": "hexo server --port 2222"
"start": "hexo server --port 2222",
"precypress": "npm install cypress-cli",
"cypress": "cypress run --record --key $CYPRESS_DOCS_RECORD_KEY",
"test-e2e": "run-p --race start cypress",
"test": "echo 'Nothing to unit test, but there are E2E tests!'"
},
"devDependencies": {
"colors": "^1.1.2",
@@ -25,6 +29,7 @@
"gulp-clean": "^0.3.2",
"gulp-debug": "^3.1.0",
"gulp-rev-all": "^0.9.7",
"npm-run-all": "^4.0.2",
"run-sequence": "^1.2.2",
"underscore.string": "^3.3.4",
"yamljs": "^0.2.10"

View File

@@ -8,6 +8,10 @@
{% if config.algolia[page.lang] %}
<!-- Algolia -->
{{ js('js/docsearch') }}
{{ js('js/docsearch-config') }}
{% endif %}
<!-- endbuild -->
<!-- Algolia -->
{% if config.algolia[page.lang] %}
{{ partial('docsearch') }}
{% endif %}

View File

@@ -0,0 +1,16 @@
<script type="text/javascript">
document.getElementById('search-input-wrap').classList.add('on');
docsearch({
apiKey: '{{ config.algolia[page.lang].api_key }}',
indexName: '{{ config.algolia[page.lang].index_name }}',
inputSelector: '#search-input',
algoliaOptions: {
// See https://www.algolia.com/doc/api-client/javascript/parameters/#overview
// For full list of options
},
autocompleteOptions: {
// See https://github.com/algolia/autocomplete.js#options
// For full list of options
}
});
</script>

View File

@@ -1,5 +1,5 @@
{% if config.google %}
<script>
<script type="text/javascript">
// Google Optimize: This snippet ensures that users only
// see your variant content, minimizing page flicker.
(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;

View File

@@ -1,14 +0,0 @@
document.getElementById('search-input-wrap').classList.add('on');
docsearch({
apiKey: '{{ config.algolia[page.lang].api_key }}',
indexName: '{{ config.algolia[page.lang].index_name }}',
inputSelector: '#search-input',
algoliaOptions: {
// See https://www.algolia.com/doc/api-client/javascript/parameters/#overview
// For full list of options
},
autocompleteOptions: {
// See https://github.com/algolia/autocomplete.js#options
// For full list of options
}
});

View File

@@ -13,7 +13,7 @@
"test": "echo 'This runs just the CLI tests' && mocha",
"test-watch": "mocha --watch",
"test-e2e": "blah",
"postinstall": "npm run all install && npm run build"
"postinstall": "npm run all install"
},
"author": "",
"license": "MIT",

View File

@@ -4,6 +4,7 @@
"description": "Desktop GUI for managing Cypress projects.",
"main": "lib/gui.js",
"scripts": {
"postinstall": "npm run build",
"build": "zunder build-dev",
"build-prod": "node ./scripts/build-prod.js",
"run-prod": "npm run build-prod && npm run server",
@@ -12,7 +13,7 @@
"clean": "zunder clean",
"clean-deps": "rm -rf node_modules",
"lint": "eslint --fix lib/*.js src/*.js* src/**/*.js*",
"test": "npm run build",
"test": "echo 'No unit tests to run, but there are e2e tests'",
"pretest": "npm run lint"
},
"repository": {

View File

@@ -3,6 +3,7 @@
"version": "1.0.0",
"description": "",
"scripts": {
"postinstall": "npm run build",
"build": "gulp build",
"watch": "gulp watch",
"clean-deps": "rm -rf node_modules",

View File

@@ -4,6 +4,7 @@
"description": "Interal Cypress repo for managing https://example.cypress.io",
"main": "index.js",
"scripts": {
"postinstall": "npm run build",
"clean-deps": "rm -rf node_modules",
"test": "NODE_ENV=test mocha",
"test-e2e": "cypress run",

View File

@@ -4,6 +4,7 @@
"description": "Cypress Chrome Extension",
"main": "index.js",
"scripts": {
"postinstall": "npm run build",
"watch": "gulp watch",
"build": "gulp build",
"build-prod": "gulp build",

View File

@@ -32,6 +32,10 @@ describe "Proxy", ->
)
it "can request the googles", ->
## give some padding to external
## network request
@timeout(10000)
Promise.all([
request({
strictSSL: false
@@ -135,4 +139,3 @@ describe "Proxy", ->
url: "https://localhost:8443/"
proxy: "http://localhost:3333"
})

View File

@@ -5,7 +5,6 @@
"main": "index.js",
"types": "../ts/index.d.ts",
"scripts": {
"build": "npm run lint",
"pretest": "npm run lint",
"test": "mocha",
"clean-deps": "rm -rf node_modules",

View File

@@ -4,6 +4,7 @@
"main": "lib/reporter",
"browser": "src/main",
"scripts": {
"postinstall": "npm run build",
"build": "node ./scripts/build-dev.js",
"build-prod": "node ./scripts/build-prod.js",
"watch": "node ./scripts/watch.js",

View File

@@ -12,6 +12,7 @@
},
"homepage": "https://github.com/cypress-io/cypress-core-runner#readme",
"scripts": {
"postinstall": "npm run build",
"build": "node ./scripts/build-dev.js",
"build-prod": "node ./scripts/build-prod.js",
"watch": "node ./scripts/watch.js",

View File

@@ -2,6 +2,7 @@
"name": "static",
"main": "index.js",
"scripts": {
"postinstall": "npm run build",
"build": "gulp build",
"test": "echo 'Nothing to test yet'"
},