title: REST API test cucumber steps best practice
body: <p>Trying to write up cucumber feature steps for REST API test.</p>
  
  <p>I am not sure which approach is better:</p>
  
  <pre><code>Given I log in with username and password
  When I add one "tv" into my cart
  And I check my cart
  Then I should see the item "tv" is in my cart
  </code></pre>
  
  <p>or</p>
  
  <pre><code>Given the client authenticate with username and password
  When the client send POST to "/cart/add" with body "{item: body}"    
  Then the response code should be "200"
  And the response body should expect "{success: true}"
  When the client send GET to "/cart"    
  Then the response code should be "200"
  And the response body should expect "{"items": ["tv"]}"
  </code></pre>
  
  <p>Is there any convention to follow when people trying to write cucumber steps for REST API?</p>