Given I am not logged in

Make sure the session is anonymous: drop the browser's cookies and web storage, reload, then confirm by opening /user/login and seeing the login form (an authenticated visitor is redirected to their profile instead).

The companion of the login step above for the "Given" half of an access-control scenario. webship-js's "I am an anonymous user" clears the cookies and opens the front page; this one additionally proves the site treats the session as anonymous.

Examples

Given I am not logged in
Given we are not logged in
Given not logged in
And I am not logged in
But I am not logged in

Pattern

Given(/^(I am |we are )*not logged in$/, …)

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