Assert the current page is (or is not) a 404 page of the site: the address answers with the status 404 and the Gatsby 404 page is rendered and hydrated at it. It fails on the development 404 page that gatsby develop shows, which a production site never shows.
Examples
Then I should be on a 404 page
Then we should be on a 404 page
And I should not be on a 404 page
Then should be on a 404 page
And we should be on a 404 page
Pattern
Then(/^(I |we )*should( not)* be on a 404 page$/, …)
Part of @webship-js/gatsby-steps (github.com/webship/gatsby-steps), a step pack for Webship-js 2.0.x.