Log out with the app's own button or link ("Sign Out", "Log out"), and wait for the page the app shows after it. The session of the account is forgotten for the rest of the run.
Examples
When I log out
And we log out
Then I log out
When we log out
And I log out
Pattern
When(/^(I |we )*log out$/, …)
Part of @webship-js/nextjs-steps (github.com/webship/nextjs-steps), a step pack for Webship-js 2.0.x.