Creating folders

BDD file with acceptance criteria for creating a folder, describing each step of the feature and user permissions.
Feature: As a user I want to create a Folder

Scenario Outline: Permitted user on create folder page - <User role>
 Given  I have <User role> role
 When  I am on create folder page
 Then  I should see the create folder form
 And  the title field will be focussed

Examples:
| User role |
| OWNER |
| ADMIN |
| EDITOR |
| EXTERNAL_EDITOR |

Scenario: Non-permitted user on create folder page
 Given  I do not have permission to create a folder
 When  I am on create folder page
 Then  I should see the You don’t have permission page

Scenario: Creating folder
 Given  I am on the create folder page
 And  I submit with a name less than 255 characters
 And  I click the submit button
 Then  I will be forwarded to the folder page

Scenario: Trying to create a folder with no name
 Given  I am on the create folder page
 And  the folder has no name
 When  I click the submit button
 Then  I should see an error message

Scenario: Trying to create a folder with a name that is too long
 Given  I am on the create folder page
 And  I submit a name longer than 255 characters
 Then  I should see an error message
 And  the folder should not be created

Scenario: Creating a folder as Invite Only
 When  I am an owner on the create folder page
 Given  I toggle the invite only folder option and submit the form
 Then  I am redirected to the newly created invite-only folder