Assert the current page is — or is not — the default access-denied (403) or not-found (404) page, by the title the System module gives each.
Checks the rendered title rather than the status code so it still holds when a site serves a custom error page node; pair it with webship-js's "the response status code should be 403" when both matter.
Examples
Then I should be on the access denied page
And we should be on the 403 page
Then should be on the 404 page
And I should land on the page not found page
Then we should not be on the access denied page
Pattern
Then(/^(I |we )*should( not)* (?:be on|land on) the (access denied|403|404|page not found) page$/, …)
Part of @webship-js/drupal-core-steps (github.com/webship/drupal-core-steps), a step pack for Webship-js 2.0.x.