Then the page should link to the page "Editing help"

Assert that the page links to another page of the wiki that exists (a blue link), or to a page that does not exist yet (a red link), by the title the link leads to. A red link to a page that exists says so: the page on screen was drawn before that page was made.

Examples

Then the page should link to the page "Editing help"
Then the page should link to the missing page "Page not written yet"
And the page should link to the page "Second test page"
Then the page should not link to the page "Unrelated page"
Then the page should not link to the missing page "Second test page"

Pattern

Then(/^the page should( not)* link to the (page|missing page) "([^"]*)"$/, …)

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