Feature: As a user I want to filter my team members for my preffered view
Scenario: On the people page viewing default filter
Given I am viewing the people list
Then I should see the people list filtered to all permissions
Scenario: Filter permission options on team members page
Given I am viewing the filter permissions on the team members page
Then I will be able to filter by:
| all |
| admin |
| can edit |
| view only |
And I should see the count of members for each permission
Scenario: Filter permission options on contributors page
Given I am viewing the filter permissions on the contributors page
Then I will be able to filter by:
| all |
| can edit |
| view only |
And I should see the count of members for each permission
Scenario Outline: Selecting filter
Given I click the <filter> and it is the same as my current filter
Then the people list state will persist
And the filter options will close
Examples:
| filter |
| all |
| admin |
| can edit |
| view only |
Scenario Outline: Changing filter
Given I click the <filter> and it is different than my current filter
Then the people list will update to be filtered by <filter>
And the filter options will close
Examples:
| filter |
| all |
| admin |
| can edit |
| view only |
Scenario: No people that match filter in the list
Given I have no people that match a filter in the list
Then the filter will be disabled
Scenario Outline: Switching from team member to contributor tabs with filter set
Given I am on the team member people list with people filtered by <team permission filter>
When I go to the contributor people list
Then I should see people filtered by <contributor permission filter>
Examples:
| team permission filter | contributor permission filter |
| all | all |
| admin | all |
| can edit | can edit |
| view only | view only |
Scenario Outline: Switching from contributor to team member tabs with filter set
Given I am on the contributor people list with people filtered by <contributor permission filter>
When I go to the team member people list
Then I should see people filtered by <team permission filter>
Examples:
| contributor permission filter | team permission filter |
| all | all |
| can edit | can edit |
| view only | view only |