Then the page should have 4 islands

Assert the page has a number of islands, or none. Islands are the <astro-island> elements of the page.

Examples

Then the page should have 4 islands
And the page should have 1 island
But the page should not have any islands
Then page should have 4 islands
And the page should not have any islands

Pattern

Then(/^(?:the )?page should (?:have (\d+) islands?|not have any islands)$/, …)

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