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

Log in as a user configured in cucumber.js worldParameters.users, so no password appears in a feature file. Each key names one account: { admin: { username: 'admin', password: process.env.ODOO_ADMIN_PASSWORD } }. The login screen is opened first, so this step works from any page.

Examples

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

Pattern

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

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