Given the cart holds 2 of the product "wool-beanie"

Puts a product in the cart without the product page, through the store's Ajax API (POST /cart/add.js): a number of a product by its handle, and a variant by its title (the first one that can be bought when none is named). Then shows the page again. For a store of your own: never use it on a store that is not yours.

Examples

Given the cart holds 2 of the product "wool-beanie"
Given the cart holds 1 of the product "canvas-tote" in "Black"
And the cart holds 3 of the product "enamel-mug"
Given the cart holds 2 of the product "wool-beanie" in "L/XL / Navy"
Given the cart holds 1 of the product "field-notebook" in "128 pages"

Pattern

Given(/^the cart holds (\d+) of the product "([^"]*)"(?: in "([^"]*)")?$/, …)

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