Then I should be logged in

Assert the browser holds, or does not hold, a session, as the server reports it (/web/session/get_session_info). The check does not depend on the page on screen, so it works on the web client, the website and the portal alike.

Examples

Then I should be logged in
And we should be logged in
Then I should not be logged in
And should be logged in
Then we should not be logged in

Pattern

Then(/^(I |we )*should( not)* be logged in$/, …)

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