Given I am a logged in user with the "admin" user

Log in to the administrator panel as a user from the users registry in cucumber.js worldParameters ({ <key>: { username, password } }, with the password read from an environment variable so no credential has to live in a feature file). Opens /administrator first, so no prior "on the administrator login page" step is needed.

Examples

Given I am a logged in user with the "admin" user
Given we are a logged in user with the username "admin"
Given I am a logged in user with "admin"
And a logged in user with username "admin"
Given I am a logged in user with the username "admin" user

Pattern

Given(/^(I am |we are )*a logged in user with( the)*( username)* "([^"]*)?"( user)*$/, …)

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