Then the grid should be sorted by "Name" ascending

Assert the values of a column on the current page are in order.

Examples

Then the grid should be sorted by "Name" ascending
Then the grid should be sorted by "Name" descending
And the grid should be sorted by "SKU" ascending
Then the grid should be sorted by "ID" descending
Then the grid should be sorted by "Price" ascending

Pattern

Then(/^the grid should be sorted by "([^"]*)" (ascending|descending)$/, …)

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