So that I can invite them to use the site
As an Administrator
I want to find and display information about a subset of candidates.
Scenario: Find by name
Given I have specified a name
When I click the find button
Then if 1 candidate with that name exists in the local database, the following details of that candidate are displayed: name, email address, party, constituency, invited, invited on, number of questions asked, number of questions answered, last active date.
Scenario: Find by email address
Given I have specified a valid email address
When I click the find button
Then if 1 candidate with that email address exists in the local database, the following details of that candidate are displayed: name, email address, party, constituency, invited, invited on, number of questions asked, number of questions answered, last active date.
Scenario: Find by constituency
Given I have selected a constituency from a list
When I click the find button
Then if 1 or more candidates in that constituency exist in the local database, the following details of those candidates are displayed: name, email address, party, constituency, invited, invited on, number of questions asked, number of questions answered, last active date.
Scenario: No results found in local database
Given I have searched using one of the above scenarios
When 0 results are found in the local database
Then the query is sent to the YourNextMP API
And any results are used to create new Candidates in the local database
And the details of these new records are displayed as described above.
So that I can invite them to use the site As an Administrator I want to find and display information about a subset of candidates.
Scenario: Find by name Given I have specified a name When I click the find button Then if 1 candidate with that name exists in the local database, the following details of that candidate are displayed: name, email address, party, constituency, invited, invited on, number of questions asked, number of questions answered, last active date.
Scenario: Find by email address Given I have specified a valid email address When I click the find button Then if 1 candidate with that email address exists in the local database, the following details of that candidate are displayed: name, email address, party, constituency, invited, invited on, number of questions asked, number of questions answered, last active date.
Scenario: Find by constituency Given I have selected a constituency from a list When I click the find button Then if 1 or more candidates in that constituency exist in the local database, the following details of those candidates are displayed: name, email address, party, constituency, invited, invited on, number of questions asked, number of questions answered, last active date.
Scenario: No results found in local database Given I have searched using one of the above scenarios When 0 results are found in the local database Then the query is sent to the YourNextMP API And any results are used to create new Candidates in the local database And the details of these new records are displayed as described above.