@fixture.boto3
Feature: Show a DNA account

  Scenario: Show a DNA account with an attached USM account
    Given the following DNA accounts
      | sub          | name          | email                 |
      | sme-dna-2503 | Adalyn Adkins | adalyn.adkins@sme.test |
    And I authenticated as admin
    And I visit the accounts page
    And I submit "sme-dna-2503" into the accounts search box
    And I follow the link containing "Adalyn"
    Then I should see the account detail "Given Name" as "Adalyn"
    And I should see the account detail "Family Name" as "Adkins"
    And I should see the account detail "Email" as "adalyn.adkins@sme.test"

  Scenario: Switch to editing the given DNA account
    Given the following DNA accounts
      | sub          | name       | email               |
      | sme-dna-1705 | Carol Cruz | carol.cruz@sme.test |
    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"
    Then I should see the account detail "Email" as "carol.cruz@sme.test"
    When I follow the link containing "Edit"
    Then I should see "Carol Cruz" account editing page

  Scenario: Save edited details of the given DNA account
    Given the following DNA accounts
      | sub          | name       | email               |
      | sme-dna-1705 | Carol Cruz | carol.cruz@sme.test |
    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"
    When I follow the link containing "Edit"
    Then I should see "Carol Cruz" account editing page
    When I update data and save
    Then I should see "Carol Cruz" account page with updated data
