Feature: Search

  Scenario: Recent searches on search start
    Given the following DNA accounts
      | sub          | name          | email                 |
      | sme-dna-2503 | Adalyn Adkins | adalyn.adkins@sme.com |
      | sme-dna-2399 | Brice Berry   | brice.berry@sme.com   |
      | sme-dna-1705 | Carol Cruz    | carol.cruz@sme.com    |
    And I authenticated as admin
    And I visit the accounts page
    And I submit "sme-dna-1705" into the accounts search box
    And I follow the link containing "Carol"
    And I click the search box
    Then I should see the following accounts in recent searches
      | name       | email              |
      | Carol Cruz | carol.cruz@sme.com |

  Scenario: Searching DNA accounts by person’s name
    Given the following DNA accounts
      | sub          | name          | email                 |
      | sme-dna-2503 | Adalyn Adkins | adalyn.adkins@sme.com |
      | sme-dna-2399 | Brice Berry   | brice.berry@sme.com   |
      | sme-dna-1705 | Carol Cruz    | carol.cruz@sme.com    |
    And I authenticated as admin
    And I enter "carol" into the search box
    Then I should see the following accounts in modal search results
      | name       | email              |
      | Carol Cruz | carol.cruz@sme.com |

  Scenario: Searching DNA accounts by person’s email address
    Given the following DNA accounts
      | sub          | name          | email                 |
      | sme-dna-2503 | Adalyn Adkins | adalyn.adkins@sme.com |
      | sme-dna-2399 | Brice Berry   | brice.berry@sme.com   |
      | sme-dna-1705 | Carol Cruz    | carol.cruz@sme.com    |
    And I authenticated as admin
    And I enter "ice.b" into the search box
    Then I should see the following accounts in modal search results
      | name        | email               |
      | Brice Berry | brice.berry@sme.com |
