Folder dashboard

BDD file with acceptance criteria for viewing a dashboard of folders, describing each step of the feature and user permissions.
Feature: As a user I want to see a list of folders in the dashboard

Scenario: Folders loading on Folders Dashboard
 Given  the folders are loading
 Then  I should see a loading state

Scenario: Folders failed to load
 And  the folders have failed to load
 Then  I should see the fail to load empty state

Scenario: No folders found on Team Folders Dashboard
 Given  there are no Folders
 Then  I should see an empty state

Scenario Outline: Folders loaded successfully on <page> team page
 Given  I am on <page> folders page
 Then  I should see folder with name <folderName>

Examples:
| page | folderName |
| my | Folder A |
| all | Folder B |

Scenario: Search folders by name
 Given  I search for a folder with a specific name
 Then  I should see only folders containing my search term

Scenario: Filter folders by owner
 Given  I search for a folder by specific user
 Then  I should see a pop up with company members
 When  I select a user
 Then  I should see a visual representation of the filter
 And  the folders should be filtered by the user

Scenario: Filter folders by non-existing user
 Given  I search for a folder by non-existing user
 Then  I should see a pop up letting me know the user is not a company member

Scenario: View folders in a grid
 Given  I have chosen to view my folders in a grid
 Then  I should see my folders listed as card blocks

Scenario: Grid View Features
 Given  I am viewing my folders in grid view
 Then  each folder should show thumbnail, title and info

Scenario: View folders in a list
 Given  I have chosen to view my folders in a list
 Then  I should see my folders listed as list rows

Scenario: List Folder Features
 Given  I am viewing my folders in list view
 Then  each folder should show thumbnail, title and info

Scenario Outline: Create folder permissions
 Given  my user role is <userRole>
 Then  I <permissionType> create folder

Examples:
| userRole | permissionType |
| OWNER | can |
| ADMIN | can |
| EDITOR | can |
| INTERNAL_REVIEWER | can not |
| EXTERNAL_EDITOR | can |
| EXTERNAL_REVIEWER | can not |

Scenario Outline: Folder tabs
 Given  my user role is <userRole>
 Then  I <permissionType> see team folders

Examples:
| userRole | permissionType |
| OWNER | can |
| ADMIN | can |
| EDITOR | can |
| INTERNAL_REVIEWER | can |
| EXTERNAL_EDITOR | can not |
| EXTERNAL_REVIEWER | can not |