diff --git a/source/_data/sidebar.yml b/source/_data/sidebar.yml index 668533f9ac..c5f6786ff3 100644 --- a/source/_data/sidebar.yml +++ b/source/_data/sidebar.yml @@ -152,6 +152,7 @@ tutorials: introduction-to-tutorials: introduction-to-tutorials.html project-setup: project-setup.html testing-inputs: testing-inputs.html + react-todo-form-submission: react-todo-form-submission.html examples: recipes: diff --git a/source/tutorials/test-a-react-todo-app/introduction-to-tutorials.md b/source/tutorials/test-a-react-todo-app/introduction-to-tutorials.md index f680ee73e2..e1baec6fe2 100644 --- a/source/tutorials/test-a-react-todo-app/introduction-to-tutorials.md +++ b/source/tutorials/test-a-react-todo-app/introduction-to-tutorials.md @@ -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" react-todo-form-submission %} | {% fa fa-video-camera %} 10:21 | +| More tutorials to come! |   | diff --git a/source/tutorials/test-a-react-todo-app/react-todo-form-submission.md b/source/tutorials/test-a-react-todo-app/react-todo-form-submission.md new file mode 100644 index 0000000000..f122e0b64c --- /dev/null +++ b/source/tutorials/test-a-react-todo-app/react-todo-form-submission.md @@ -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. \ No newline at end of file diff --git a/themes/cypress/languages/en.yml b/themes/cypress/languages/en.yml index 0e8808f42b..1f59e753f6 100644 --- a/themes/cypress/languages/en.yml +++ b/themes/cypress/languages/en.yml @@ -176,6 +176,7 @@ sidebar: introduction-to-tutorials: Introduction project-setup: Project setup testing-inputs: Testing text inputs + react-todo-form-submission: Testing form submission examples: recipes: Recipes unit-testing-recipe: Unit Testing