Log out of the store through the customer menu of the header. The store shows "You are signed out" and goes to the home page by itself five seconds later: the step waits for that redirect, so the next step is not interrupted by it.
Examples
When I log out of the store
And I log out of the store
When we log out of the store
When log out of the store
And we log out of the store
Pattern
When(/^(I |we )*log out of the store$/, …)
Part of @webship-js/magento-steps (github.com/webship/magento-steps), a step pack for Webship-js 2.0.x.