BDD file with acceptance criteria for the members list on a prototype feature, describing each step of the feature and user permissions.
Feature: As a user I want to be able to see members on a project
Scenario: Prototype view page is loading
Given the members are loading
Then I should see a loading state where the members section appears
Scenario: No members
Given no members have loaded
Then the owner should be shown
And a plus button to add members should be availble
Scenario: Up to 10 members
Given 10 or less members have loaded
Then an alphabetically ordered list of up to 10 members should be shown
And the plus button should be shown to the left hand side of the list
And the project owner should be the first member to the right of the plus button
Scenario: Over 10 members
Given over 10 members have loaded
Then an alphabetically ordered list of the members should be shown
And the count of remaining members button should be shown to the left hand side of the list
And the project owner should be the first member to the right of the count of members button
Scenario: Hover over a member icon
Given I hover over a member in the list
Then I should see a tooltip to the left with the username of that member
Scenario: Add a member
Given my user role is <role>
Then I should see the plus button to add members
And I should be able to click the member list to open the member modal
Examples:
| role |
| OWNER |
| ADMIN |
| EDITOR |
Scenario: Cannot add a member
Given my user role is <role>
Then I should not be able to see the plus button to add members
And I should not be able to click the list of members to open the member modal
Examples:
| role |
| INTERNAL_REVIEWER |
| EXTERNAL_REVIEWER |
Scenario: Members failed to load
Given the members list fails to load
Then I should see an error state over the list