When I add the product to the cart

Press "Add to Cart" on the product's page, with a quantity when one is named. Assert the shop's answer next.

Examples

When I add the product to the cart
When I add the product to the cart with a quantity of 3
And we add the product to the cart
When we add the product to the cart with a quantity of 2
When I add the product to the cart with a quantity of 1

Pattern

When(/^(?:I|we) add the product to the cart(?: with a quantity of (\d+))?$/, …)

Part of @webship-js/opencart-steps (github.com/webship/opencart-steps), a step pack for Webship-js 2.0.x.