Sign in to the admin as a user of the users registry in cucumber.js, through the sign in form. A session that is already open is ended first, so a scenario can change users.
Examples
Given I am logged in to the admin as "owner"
Given I am logged in to the admin as "editor"
Given we are logged in to the admin as "author"
When I log in to the admin as "contributor"
When we log in to the admin as "administrator"
Pattern
Given(/^(?:I |we )?(?:am |are )?log(?:ged)? in to the admin as "([^"]*)"$/, …)
Part of @webship-js/ghost-steps (github.com/webship/ghost-steps), a step pack for Webship-js 2.0.x.