Then I should be logged in

Assert the session is (or is not) logged in to the backend, optionally as a given user. Logged in means the backend shell (.scaffold) is shown; the user is read from the user menu of the toolbar (.toolbar-item-user .toolbar-item-name) and may be named by its handle in the users registry or by its username.

Examples

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

Pattern

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

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