Given I am logged in as the customer "customer"

Log in to the store as a customer of the users registry in cucumber.js (worldParameters.users, an entry with an email), by its handle. A session of another customer is ended first.

Examples

Given I am logged in as the customer "customer"
Given I am logged in as the customer "shopper"
When I log in as the customer "customer"
Given we are logged in as the customer "customer"
When we log in as the customer "shopper"

Pattern

Given(/^(?:(?:I am |we are )+logged in|(?:I |we )*log in) as the customer "([^"]*)"$/, …)

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