Assert that somebody is, or nobody is, logged in (a guest is nobody). The step opens the Dashboard and reads the user menu of the page.
Examples
Then I should be logged in
Then I should not be logged in
Then we should be logged in
And we should not be logged in
But I should not be logged in
Pattern
Then(/^(I |we )*should( not)* be logged in$/, …)
Part of @webship-js/moodle-steps (github.com/webship/moodle-steps), a step pack for Webship-js 2.0.x.