Viewing a folder

BDD file with acceptance criteria for viewing a folder, describing each step of the feature and user permissions.
Feature: As a user I should see a list of projects inside a folder

Scenario: User views projects in a folder
 Then  I should see should see a list of projects, their thumbnail, title and info

Scenario: User searches for projects in a folder
 When  I enter a search term
 Then  I should see should see a list of projects that match the search term
 When  I refresh the page
 Then  I should still see a list of projects that match the search term

Scenario Outline: Anonymous user hovers over a project
 Given  I am not logged in
 When  I hover over a <projectType>
 Then  I should see a <cta> button
 And  it should link me to <destination>

Examples:
| projectType | cta | destination |
| Prototype | Play | Prototype viewer |
| User Test | Start test | Start user test |

Scenario Outline: Unauthorized user hovers over a project
 Given  I am logged in as a member of a different team than the folder resides in
 When  I hover over a <projectType>
 Then  I should see a <cta> button
 And  it should link me to <destination>

Examples:
| projectType | cta | destination |
| Prototype | Play | Prototype viewer |
| User Test | Start test | Start user test |

Scenario Outline: Authorized user hovers over a project
 Given  I am logged in as a member of the same team the folder resides in
 When  I hover over a <projectType>
 Then  I will see a View button linking me to <destination>
 And  I will see a play button linking me to prototype viewer on prototype projects

Examples:
| projectType | destination |
| Prototype | Prototype project view |
| User Test | User test results view |

Scenario Outline: Folder permissions when a collaborator
 Given  I am <userRole>
 And  I am a collaborator on the folder
 And  I am NOT a collaborator on the projects in the folder
 Then  the folder card will be in <mode> mode

Examples:
| userRole | mode |
| OWNER | selectable |
| ADMIN | selectable |
| EDITOR | selectable |
| EXTERNAL_EDITOR | non-selectable |
| INTERNAL_REVIEWER | non-selectable |
| EXTERNAL_REVIEWER | non-selectable |

Scenario Outline: Folder permissions when not a collaborator
 Given  I am <userRole>
 And  I am not a collaborator on the folder
 Then  the folder card will be in <mode> mode

Examples:
| userRole | mode |
| OWNER | selectable |
| ADMIN | selectable |
| EDITOR | selectable |
| EXTERNAL_EDITOR | non-selectable |
| INTERNAL_REVIEWER | non-selectable |
| EXTERNAL_REVIEWER | non-selectable |

Scenario Outline: Viewing projects in thumbnail & list layout
 Given  I click <type> view toggle
 Then  I will see my projects in a <layout> layout
 And  the project details will be in view

Examples:
| type | layout |
| grid-view | thumbnail |
| list-view | list |

Scenario: Primary CTA on mobile
 Given  I am a mobile user
 Then  I should see a CTA on the card linking me to prototype viewer

Scenario Outline: Prototype secondary CTAs
 Given  I hover over a prototype project card
 Then  I should see cta linking me to prototype viewer on first screen

Scenario: Secondary CTAs on mobile
 Given  I am on mobile
 Then  secondary CTAs should not be available on the image thumbnail card