Using Feature Tests to Build a Feature
Explore how to build and test a feature in Rails using Capybara by writing integration tests that create and order tasks within a project. Understand the Capybara API and how to simulate user interactions like visiting pages and manipulating tasks to verify correct UI and functionality.
We'll cover the following...
We'll cover the following...
When we last left the application, we allowed for the creation of new projects. Let’s follow up on that and add a sequence where we can see a page for an existing project and add a task to it. To give this a little bit of back-end logic to play with, let’s set up a situation where the tasks are ordered and then move one task above the other task.
Writing a test
This test has a few parts. Let’s take a second to plan the given/when/then: