Assume that I arranged my cucumber features in files like that:
features/
├── add_project.feature
├── list_projects.feature
In my application on the page where I can list all projects I also have a link that points to the page where I can create a new project. I want to test that link with the following scenario:
Scenario: Link to create page is visible
Given I am logged in as a staff member
When I go to the projects page
Then I should see a link to the create a project page
Now my dilemma: Where do I put this scenario?
list_projects.feature
.
add_projects.feature
.
I am sure people have faced this problem before and I want to establish a guideline for the application, right now both styles can be found which makes it harder to maintain. Any input how you did it and why?
I would include that behaviour in the add_projects.feature
Although Cucumber's built-in generators seem to encourage the mapping of one feature per controller, this often isn't the best way to arrange things so don't worry about breaking that convention.