Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding form submission video page to the tutorial #219

Merged
merged 3 commits into from
Nov 4, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/_data/sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ tutorials:
introduction-to-tutorials: introduction-to-tutorials.html
project-setup: project-setup.html
testing-inputs: testing-inputs.html
form-submission: form-submission.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to ensure that these filenames are not generic enough that they won't conflict with ANY doc that's ever added in the future (hence why I renamed 'introduction').

The idea is that you can always link directly from cypress.on (https://on.cypress.io/form-submission). Just something to keep in mind while you're added pages.

Also, you should probably become familiar with the cypress.on repo. Mostly, this manifest.yml file needs to stay up to date with this sidebar.yml file (merge PR to develop, PR dev to prod, it auto deploys). This should be automated, but it isn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, good to know. I'll poke around that repo a bit.

I'll push another commit with this file renamed too.


examples:
recipes:
Expand Down
12 changes: 12 additions & 0 deletions source/tutorials/test-a-react-todo-app/form-submission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Testing form submission
comments: false
layout: video
containerClass: tutorial
---

{% video 241063147 %}

## What's covered

We will implement form submission for our todo app, leveraging {% url `cy.server()` server %} and {% url `cy.route()` route %} to stub calls to our API. We will iterate on our test and implementation, focusing on the application's "happy path" first. Once our form is working, we'll use another stubbed XHR call to setup a failure scenario and implement the code to properly display an error message.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, url tag helpers! We use these instead of regular markdown links because during build, the docs literally check every single url tag to ensure we haven't written any incorrectly.

Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ We have a lot of ground to cover, so let's get started!
| -- | -- |
| 1. {% url "Project setup" project-setup %} | {% fa fa-video-camera %} 3:52 |
| 2. {% url "Testing inputs" testing-inputs %} | {% fa fa-video-camera %} 7:17 |
| More tutorials to come! | |
| 3. {% url "Form submission and XHR stubbing" form-submission %} | {% fa fa-video-camera %} 10:21 |
| More tutorials to come! |   |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this   the table cell collapsed and didn't show the gray background like the left cell did.

1 change: 1 addition & 0 deletions themes/cypress/languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ sidebar:
introduction-to-tutorials: Introduction
project-setup: Project setup
testing-inputs: Testing text inputs
form-submission: Testing form submission
examples:
recipes: Recipes
unit-testing-recipe: Unit Testing
Expand Down