Then the "Blocks" field should have 2 blocks

Assert how many blocks a matrix field has.

Examples

Then the "Blocks" field should have 2 blocks
Then the "Blocks" field should have 0 blocks
Then the "Blocks" field should have 1 block
And the "Blocks" field should have 3 blocks
And the "Blocks" field should have 1 block

Pattern

Then(/^the "([^"]*)" field should have (\d+) blocks?$/, …)

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