Leaving a comment

BDD file with acceptance criteria for leaving a comment on a prototype
Feature: As a user I want to leave a comment on a prototype

Scenario Outline: Write comment permissions
 Given  I am a <userRole>
 Then  I have permission to write comments on a prototype

Examples:
| userRole |
| OWNER |
| ADMIN |
| EDITOR |
| EXTERNAL_EDITOR |
| INTERNAL_REVIEWER |
| EXTERNAL_REVIEWER |

Scenario Outline: Write comment permissions
 Given  I am a logged out user
 Then  I cannot write comments on a prototype

Scenario: Comment panel is open
 Given  I am viewing the comments panel
 And  I have permission to write comments
 Then  I will see a text editor
 And  I will have option to add a <comment type> comment

Examples:
| comment type |
| public |
| private |
| annotated |

Scenario: Adding comment
 Given  I write a comment
 And  I submit it
 Then  the comment should save
 And  I will see it listed in the panel

Scenario: Adding comment fails
 Given  I write a comment
 And  I submit it
 And  the comment fails to save
 Then  I should see visual feedback explaining there was an issue