These are a few stabs, I'm not happy about sort being |a| or |z| and then or being ||. Maybe or should just be or.
Lets bat this around a bit before we start to implement it.
Feature: Searching on an Index page
Scenario: Searching for a person
Given I am on the people index
When I type a letter into the search box
Then The list should update within 100ms
Scenario: Searching for a project
Given I am on the project index
When I type a letter into the search box
Then The list should update within 100ms
Scenario: sorting people by first name
Given I am on the people index
When I type "first:|a|" into the search box
Then The list should be sorted alphabetically by first name
Scenario: sorting people by first name
Given I am on the people index
When I type "first:|z|" into the search box
Then The list should be reverse sorted alphabetically by first name
Scenario: sorting people by last name
Given I am on the people index
When I type "last:|a|" into the search box
Then The list should be sorted alphabetically by last name
Scenario: sorting people by last name
Given I am on the people index
When I type "last:|z|" into the search box
Then The list should be reverse sorted alphabetically by last name
Scenario: searching and sorting people by first name
Given I am on the people index
When I type "first:be|a|" into the search box
Then The list should be sorted alphabetically by first name
And All people shown should have "be" in their first name somewhere
Scenario: searching for everyone with a postgraduate degree
Given I am on the people index
When I type "qualifications.level:'Postgraduate degree'" into the search box
Then The list should show everyone who has a Postgraduate degree listed
Scenario: searching for everyone who is active and has no extension
Given I am on the people index
When I type "condition:Active & extension:''" into the search box
Then The list should show everyone who is active and has no extension
Scenario: searching for everyone who is active or has no extension
Given I am on the people index
When I type "condition:Active || extension:''" into the search box
Then The list should show everyone who is active and has no extension
These are a few stabs, I'm not happy about sort being
|a|
or|z|
and then or being ||. Maybe or should just beor
.Lets bat this around a bit before we start to implement it.