Sort the list by a column with its heading, as a person clicks it (once for ascending, again for descending).
Examples
When I sort the list by "Price"
When I sort the list by "Price" in descending order
And I sort the list by "Name"
When I sort the list by "Order date" in ascending order
When we sort the list by "Title" in descending order
Pattern
When(/^(I |we )*sort the list by "([^"]*)"(?: in (ascending|descending) order)?$/, …)
Part of @webship-js/filament-steps (github.com/webship/filament-steps), a step pack for Webship-js 2.0.x.