Writing features

The first thing we need to do is to identify the features on the ordering page. As we saw in the last chapter, there should be only one single user action in the system per feature.

A nice trick to extract features is to identify the main conceptual entities that the user is going to interact with. Then, we can simply discover the operations that the user can execute on each entity and write one feature per operation.

In the order subsystem, we will obviously have an Order entity. With this in mind, we can think of several features, such as the following ones:

  • Placing the order
  • Creating a new order
  • Adding some beverages to the order
  • Removing a beverage from the order
  • Changing the quantity of a beverage

Of course, each one of these actions ...

Get Learning Behavior-driven Development with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.