Merge branch 'master' of github.com:cypress-io/cypress-monorepo

This commit is contained in:
Gleb Bahmutov
2017-05-18 12:33:48 -04:00
42 changed files with 105 additions and 74 deletions

View File

View File

@@ -4,6 +4,7 @@ _ = require('lodash')
describe "Documentation", ->
beforeEach ->
cy.server()
@mainGuides = "/guides/getting-started/why-cypress"
context "Pages", ->
describe "404", ->
@@ -27,7 +28,7 @@ describe "Documentation", ->
cy
.contains(".main-nav-link", "Guides")
.should("have.attr", "href")
.and("include", "/guides/welcome/guides.html")
.and("include", @mainGuides)
cy
.contains(".main-nav-link", "API")
.should("have.attr", "href")
@@ -64,9 +65,7 @@ describe "Documentation", ->
describe "Guides & API", ->
beforeEach ->
@guidesHomepage = "/guides/welcome/guides"
cy.visit(@guidesHomepage + ".html")
cy.visit(@mainGuides + ".html")
context "Header", ->
it.skip "should display capitalized title of doc", ->
@@ -77,7 +76,7 @@ describe "Documentation", ->
cy
.contains("a", "Improve this doc").as("editLink")
.get("@editLink").should("have.attr", "href")
.and("include", @guidesHomepage + ".md")
.and("include", @mainGuides + ".md")
.get("@editLink").should("have.attr", "href")
.and("include", "https://github.com/cypress-io/cypress-documentation/edit/master/source/")
@@ -101,7 +100,7 @@ describe "Documentation", ->
it "displays current page as highlighted", ->
cy
.get("#sidebar").find(".current")
.should("have.attr", "href").and("include", "guides.html")
.should("have.attr", "href").and("include", "why-cypress.html")
it "displays English titles in sidebar", ->
cy
@@ -114,7 +113,7 @@ describe "Documentation", ->
it "displays English link names in sidebar", ->
cy
.get("#sidebar")
.find(".sidebar-link").each (displayedLink, i) ->
.find(".sidebar-link").first(5).each (displayedLink, i) ->
englishLink = @english.sidebar.guides[@sidebarLinkNames[i]]
expect(displayedLink.text().trim()).to.eq(englishLink)
@@ -131,8 +130,8 @@ describe "Documentation", ->
context "Pagination", ->
beforeEach ->
@firstPage = "guides.html"
@nextPage = "our-goals.html"
@firstPage = "why-cypress.html"
@nextPage = "installing-cypress.html"
it "does not display Prev link on first page", ->
cy.get(".article-footer").should("not.contain", "Prev")

View File

@@ -14,6 +14,7 @@
"clean-deps": "rm -rf node_modules",
"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",
"precypress": "npm install cypress-cli",
"cypress": "cypress run --record --key $DOCS_RECORD_KEY",

View File

@@ -22,7 +22,7 @@ npm install
npm start
```
Visit [http://localhost:4000/](http://localhost:4000/)
Visit [http://localhost:2222/](http://localhost:2222/)
### Writing Docs

View File

@@ -1,3 +1,4 @@
guides: /guides/welcome/guides.html
guides: /guides/getting-started/why-cypress.html
api: /api/welcome/api.html
ecosystem: /ecosystem/index.html
faq: /faq/index.html

View File

@@ -1,41 +1,42 @@
guides:
welcome:
intro: guides.html
our-goals: our-goals.html
getting-started:
installing-and-running: installing-and-running.html
why-cypress: why-cypress.html
installing-cypress: installing-cypress.html
writing-your-first-test: writing-your-first-test.html
using-the-cypress-runner: using-the-cypress-runner.html
examples:
list-of-example-apps: list-of-example-apps.html
list-of-example-recipes: list-of-example-recipes.html
dashboard:
features: features.html
projects: projects.html
recorded-runs: recorded-runs.html
organizations: organizations.html
guides:
configuration: configuration.html
issuing-commands: issuing-commands.html
finding-elements: finding-elements.html
making-assertions: making-assertions.html
network-requests: network-requests.html
testing-your-app: testing-your-app.html
next-steps: next-steps.html
cypress-basics:
overview-of-the-gui-tool: overview-of-the-gui-tool.html
commands-elements-and-assertions: commands-elements-and-assertions.html
dead-simple-debugging: dead-simple-debugging.html
aliases-variables-in-an-async-world: aliases-variables-in-an-async-world.html
stubs-spies-clocks: stubs-spies-clocks.html
dealing-with-the-network: dealing-with-the-network.html
taking-screenshots-and-recording-videos: taking-screenshots-and-recording-videos.html
integrating-with-cypress:
cli-tool: cli-tool.html
continuous-integration: continuous-integration.html
environment-variables: environment-variables.html
stubs-spies-and-clocks: stubs-spies-and-clocks.html
using-aliases: using-aliases.html
creating-fixtures: creating-fixtures.html
screenshots-and-videos: screenshots-and-videos.html
bundled-tools: bundled-tools.html
reporters: reporters.html
references:
cli-tool: cli-tool.html
error-messages: error-messages.html
anti-patterns: anti-patterns.html
known-issues: known-issues.html
web-security: web-security.html
browser-management: browser-management.html
userland-extensions: userland-extensions.html
the-cypress-dashboard: the-cypress-dashboard.html
advanced-cypress:
the-cypress-workflow: the-cypress-workflow.html
coming-from-selenium: coming-from-selenium.html
custom-commands: custom-commands.html
web-security: web-security.html
how-cypress-really-works: how-cypress-really-works.html
talking-to-your-backend: talking-to-your-backend.html
spawning-processes: spawning-processes.html
appendices:
error-messages: error-messages.html
best-practices: best-practices.html
anti-patterns: anti-patterns.html
all-videos: all-videos.html
contributing: contributing.html
changelog: changelog.html
roadmap: roadmap.html
cypress-api-design: cypress-api-design.html
api:
welcome:

View File

@@ -0,0 +1,11 @@
title: The Cypress Ecosystem
comments: false
---
# Recipes
# Example Apps
# Talks
# Podcasts
# Articles
# Plugins
# Adapters

View File

@@ -0,0 +1,5 @@
title: Installing Cypress
comments: true
---
# Placeholder

View File

@@ -0,0 +1,5 @@
title: Why Cypress?
comments: true
---
# Placeholder

View File

@@ -0,0 +1,5 @@
title: Guides
comments: true
---
# Placeholder

View File

@@ -2,6 +2,7 @@ menu:
guides: Guides
api: API
faq: FAQ
ecosystem: Ecosystem
search: Search
index:
@@ -17,43 +18,44 @@ page:
sidebar:
guides:
welcome: Welcome
intro: Intro
our-goals: Our Goals
getting-started: Getting Started
installing-and-running: Installing and Running
why-cypress: Why Cypress
installing-cypress: Installing Cypress
writing-your-first-test: Writing Your First Test
using-the-cypress-runner: Using the Cypress Runner
examples: Examples
list-of-example-apps: List of Example Apps
list-of-example-recipes: List of Example Recipes
dashboard: Dashboard
features: Features
projects: Projects
recorded-runs: Recorded Runs
organizations: Organizations
guides: Guides
configuration: Configuration
issuing-commands: Issuing Commands
finding-elements: Finding Elements
making-assertions: Making Assertions
network-requests: Network Requests
testing-your-app: Testing Your App
next-steps: Next Steps
cypress-basics: Cypress Basics
overview-of-the-gui-tool: Overview of the GUI Tool
commands-elements-and-assertions: Commands, Elements, and Assertions
dead-simple-debugging: Dead Simple Debugging
aliases-variables-in-an-async-world: Aliases: Variables in an Async World
stubs-spies-clocks: Stubs, Spies, and Clocks
dealing-with-the-network: Dealing with the Network
taking-screenshots-and-recording-videos: Taking Screenshots and Recording Videos
integrating-with-cypress: Integrating with Cypress
cli-tool: CLI Tool
continuous-integration: Continuous Integration
environment-variables: Environment Variables
stubs-spies-and-clocks: Stubs, Spies, and Clocks
using-aliases: Using Aliases
creating-fixtures: Creating Fixtures
screenshots-and-videos: Screenshots and Videos
bundled-tools: Bundled Tools
reporters: Reporters
references: References
cli-tool: CLI Tool
error-messages: Error Messages
anti-patterns: Anti-patterns
known-issues: Known Issues
web-security: Web Security
browser-management: Browser Management
userland-extensions: Userland Extensions
the-cypress-dashboard: The Cypress Dashboard
advanced-cypress: Advanced Cypress
the-cypress-workflow: The Cypress Workflow
coming-from-selenium: Coming from Selenium?
custom-commands: Custom Commands
web-security: Web Security
how-cypress-really-works: How Cypress Really Works
talking-to-your-backend: Talking to Your Backend
spawning-processes: Spawning Processes
appendices: Appendices
error-messages: Error Messages
best-practices: Best Practices
anti-patterns: Anti-patterns
all-videos: All Videos
contributing: Contributing
changelog: Changelog
roadmap: Roadmap
cypress-api-design: Cypress API Design
api:
welcome: Welcome
api: api

View File

@@ -5,11 +5,12 @@
{{ js('js/menuspy') }}
{{ js('js/toc') }}
{{ js('js/mobile_nav') }}
<!-- endbuild -->
{% if config.algolia[page.lang] %}
<!-- Algolia -->
{{ js('js/docsearch') }}
{% endif %}
<!-- endbuild -->
<!-- Algolia -->
{% if config.algolia[page.lang] %}