Then the page should have an edit link ending with "docs/intro.mdx"

Assert the page has an "Edit this page" link to an address, the whole of it ("to") or its end ("ending with"), or that it has none. The address is the editUrl of the site's configuration followed by the file of the page.

Examples

Then the page should have an edit link ending with "docs/intro.mdx"
And the page should have an edit link to "https://example.com/docs/edit/main/docs/intro.mdx"
Then page should have an edit link ending with "version-1.0/intro.mdx"
But the page should not have an edit link
And the page should have an edit link ending with "blog/2026-07-08-version-2-0.mdx"

Pattern

Then(/^(?:the )?page should (?:have an edit link (to|ending with) "([^"]*)?"|(not) have an edit link)$/, …)

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