Then I should be on an admin page

Assert the current page is — or is not — one of the site's administration pages, via the path-admin body class core adds for any route flagged as an admin route. That flag, not the URL prefix, is what decides whether the admin theme is used, so this is the assertion that matches what a site actually treats as "admin".

Examples

Then I should be on an admin page
And we should be on an administration page
Then should be on an admin page
And I should not be on an admin page
Then we should not be on an administration page

Pattern

Then(/^(I |we )*should( not)* be on an admin(?:istration)? page$/, …)

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