Sort the list by a column, in ascending or descending order, with the sort control of its title. The list remembers the order for the employee, as it remembers its filters: put the usual order back at the end of a scenario.
Examples
When I sort the list by "Name" in ascending order
When I sort the list by "ID" in descending order
When we sort the list by "Quantity" in descending order
And I sort the list by "Reference" in ascending order
When sort the list by "Name" in descending order
Pattern
When(/^(I |we )*sort the list by "([^"]*)" in (ascending|descending) order$/, …)
Part of @webship-js/prestashop-steps (github.com/webship/prestashop-steps), a step pack for Webship-js 2.0.x.