When I log in as "admin" with password "secret"

Fill and submit the login form with the given login and password, for scenarios where the credentials are the subject (a wrong password, a disabled account). The login screen must be open already. For everything else use the users registry: Given I am a logged in user with the "admin" user.

Examples

When I log in as "admin" with password "secret"
When we log in as "demo@example.com" with password "p@ssw0rd"
And I sign in as "admin" with password "secret"
When we sign-in as "reviewer" with password "hunter2"
And log in as "portal_user" with password "letmein"

Pattern

When(/^(I |we )*(?:log in|sign[- ]?in) as "([^"]*)?" with password "([^"]*)?"$/, …)

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