Sending participant invite

BDD file with acceptance criteria for sending user test invites via email
Feature: As a user I want to send a user test invite over email

Scenario Outline: <userRole> can send a test invite
 Given  my user role is <userRole>
 Then  I can see the button to send a test invite

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

Scenario: loading the invitation page
 Given  I have hovered the invite participants button
 Then  the test invitation page will load
 And  I will see an invite box

Scenario: Entering text into the invite box
 Given  I have entered text into the invite box
 Then  this will be used as the email invite destination

Scenario: Sending invitations to valid emails
 Given  I have entered a valid email address into the invite box
 When  I click the send invite button to send an invite to the address
 Then  the invite page will close

Scenario: Adding multiple emails in the invite box with commas
 Given  I have added multiple emails in the invite box separated with commas
 When  I click the send invite button to send an invite to each address
 Then  the invite page will close

Scenario: Sending invites to an invalid email address
 Given  I have entered an invalid email address into the invite box
 When  I click the send invite button
 Then  I will see an error notification

Scenario: Adding multiple emails in the invite box without commas
 Given  I have added multiple emails in the invite box and they are not separated with commas
 When  I click send invite
 Then  I will be shown an error message

Scenario: Sending invitation fails
 Given  I have clicked the send invite button
 And  the invitation fails to send
 Then  I will be shown an error message