Given I am logged in as "admin"

Log in with an account of the users registry (worldParameters.users in cucumber.js), by its handle. Any session of the browser is ended first. The step fails with the message of the site when the session does not start.

Examples

Given I am logged in as "admin"
Given I am logged in as "editor"
Given we are logged in as "member"
And I am logged in as "editor"
Given logged in as "admin"

Pattern

Given(/^(I am |we are )*logged in as "([^"]*)"$/, …)

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