Feature: Export DNA accounts from list page

  Scenario: Export DNA accounts
    Given the following DNA accounts
      | sub          | name       | email               |
      | sme-dna-1705 | Carol Cruz | carol.cruz@sme.test |
    And the following Claims
      | resource_group       | claim_name         | claim_values    | multi |
      | Apollo               | Role               | User, Superuser | No    |
      | Apollo               | Market permissions | USA, UAE, UK    | Yes   |
    And the following assigned claim values for DNA sub "sme-dna-1705"
      | claim_name         | claim_value    |
      | Role               | User           |
      | Market permissions | USA, UK        |
    And I authenticated as admin
    When I visit the accounts page
    And  I follow the link containing "Export"
    Then I should download CSV file matching the following content
      """
      First Name,Last Name,Email,ID,VIP,Status,Personnel Type,Supervisor Email,Location,Business Unit,Employee Corporate Username,Job Title,Expiration Date,Apollo: First Login,Apollo: Last Login,Apollo: Last Activity,Apollo: Enabled,Apollo: Role,Apollo: Market permissions
      Carol,Cruz,carol.cruz@sme.test,sme-dna-1705,0,active,_,_,_,_,_,_,_,,,,1,User,"UK, USA"
      """
