Then I should be logged in

Assert the browser session is authenticated, or not, as the server sees it (not by the admin bar or a cookie). With "as the ... user" it also checks that the session is that registry account.

Examples

Then I should be logged in
And we should be logged in
Then I should not be logged in
And I should be logged in as the "editor" user
Then we should be logged in as the "admin" user

Pattern

Then(/^(I |we )*should( not)* be logged in(?: as the "([^"]*)" user)?$/, …)

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