The server knows the browser as a signed-in account (any, or the one of a handle of the users registry). The step asks the server itself, the way a silent sign-in check does, without touching the page.
Examples
Then I should be logged in
Then I should be logged in as "user"
Then I should be logged in as "otpuser"
Then we should be logged in as "editor"
Then I should be logged in as "administrator"
Pattern
Then(/^(?:I|we) should be logged in(?: as "([^"]*)")?$/, …)
Part of @webship-js/keycloak-steps (github.com/webship/keycloak-steps), a step pack for Webship-js 2.0.x.