Given I am logged in to the site with the "member" user

Log in to the site as an account of the users registry in cucumber.js (worldParameters.users), so no credential lives in a feature file. The login page is opened first; a session that is already open is closed before. The accounts are created once with the Joomla CLI (php cli/joomla.php user:add); a feature never creates users.

Examples

Given I am logged in to the site with the "member" user
Given we are logged in to the site with the "editor" user
Given I am logged in to the site with "member"
And logged in to the site with the username "manager"
Given I am logged in to the site with the username "member" user

Pattern

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

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