Reputation: 609
Should the folder structure for e2e test cases in Protractor be the same as that of the application?
Upvotes: 6
Views: 4719
Reputation: 8648
This depends on the folder structure of your application :-).
To use Protractor effectively you need:
The page objects likely correspond to Angular elements such as templates, so you might follow a similar folder structure.
The actual test cases navigating through the states are closer to user stories. If you use a structured story format, you might organize scenarios into narratives ("As a ... I want ... so that ...") which then come with a number of acceptance scenarios ("Given ... when ... then") grouped together.
If you want to learn more about setting up Protractor tests using state machines, you can have a look at my blog post.
Upvotes: 4