Creating a prototype project

BDD file with acceptance criteria forcreating a prototype project, describing each step of the feature and user permissions.
Feature: As a team member I want to create a prototype project

Scenario: Reached project limit
 Given  I am on the free plan
 And  I have reached the project limit
 When  I go to create a project
 Then  I should be shown the paywall

Scenario Outline: Create prototype page permissions
 Given  my user role is <userRole>
 When  I am on the create prototype page
 Then  I will see the <contentType>

Examples:
| userRole | contentType |
| OWNER | create prototype form |
| ADMIN | create prototype form |
| EDITOR | create prototype form |
| EXTERNAL_EDITOR | create prototype form |
| INTERNAL_REVIEWER | no access message |
| EXTERNAL_REVIEWER | no access message |

Scenario: Default prototype frame
 Given  I am creating a prototype project
 And  I do not change the default frame
 Then  the prototype frame will be Web/TV

Scenario: Creating a prototype with a name that is too long
 Given  I am on the create prototype page
 Then  I will not be able to submit a name longer than 255 characters

Scenario: Create a prototype without a name
 Given  I submit no name for my prototype
 Then  I will see an error message
 And  the prototype will not be created

Scenario: Clear name error state
 Given  I have failed to submit a name for my prototype
 And  I can see an error message
 When  I change the project name
 Then  the error message will disappear

Scenario: Creating a prototype loading state
 Given  the prototype creation is in progress
 Then  I will see a loading state

Scenario Outline: Visibility option
 Given  I am on create prototype project page
 Then  I will be able to create a prototype with <visibility> visibility

Examples:
| visibility |
| WORKSPACE |
| PRIVATE |

Scenario Outline: Device type option
 Given  I am on create prototype project page
 Then  I will be able to create a prototype with frame set to <device>

Examples:
| device |
| Website/TV |
| iPhone 8 |
| iPhone 8 Plus |
| iPhone 12 |
| iPad |
| Android |
| Apple Watch |

Scenario: Prototype creation fail
 Given  the prototype creation fails
 Then  I will remain on the prototype create page
 And  I will see an error message

Scenario: Clear submit error with input
 Given  the prototype creation fails
 And  I can see an error message
 When  I change the project name
 Then  the error message should disappear

Scenario: Clear submit error with device change
 Given  the prototype creation fails
 And  I can see an error message
 When  I change the selected frame
 Then  the error message should disappear