Feature: As a Marvel user I want to invite people to company
Scenario Outline: Below members allowance
Given I am on <membersAllowance> members allowance
And I've used less members than my allowance
Then member will be selected by default
Examples:
| membersAllowance |
| 3 |
| 6 |
Scenario: Opening invite modal from guests tab when guest seats available
Given I come to invite modal from guest tab
And I still have guest seats available
Then the default role will be set to guest
Scenario: Opening invite modal from guests tab when no more guest seats available
Given I come to invite modal from guest tab
And I don't have any more guest seats available
Then the default role will be set to member
And the guest option will be disabled
Scenario: Above members allowance, below 6 total
Given I have less than 6 members
And I used more member seats than I purchased
Then member will be selected by default
And I will be able to add more member emails
Scenario: 6 members reached
Given I have 6 users on my company
Then guest will be selected by default
And I will not be able to select member
And I will be able to add more guest emails
Scenario: More than 6 members reached (legacy, not unlimited)
Given I have more than 6 users on my company
Then guest will be selected by default
And I will not be able to select member
And I will be able to add more guest emails
Scenario: Disabled member
Given I have hovered over disabled member
Then I will see explanation tooltip
Scenario Outline: Adding less guest emails than members allowance
Given I am on <membersAllowance> members allowance
And I have not reached my allowance
When I add fewer guest emails than remaining pre-paid seats allowance
Then I will be able to switch to adding members
Examples:
| membersAllowance |
| 3 |
| 6 |
Scenario Outline: Adding more guest emails than members allowance
Given I am on <membersAllowance> members allowance
When I add more emails than the member allowance
Then I <canSwitchToMember> be able to switch to adding members
And I will be able to add more guest emails
Examples:
| membersAllowance | canSwitchToMember |
| 3 | will |
| 6 | will not |
Scenario Outline: Adding less member emails than prepaid seats count
Given I am on <membersAllowance> members allowance
When I add fewer member emails than remaining pre-paid seats allowance
Then I will be able to add more member emails
Examples:
| membersAllowance |
| 3 |
| 6 |
Scenario Outline: Adding more member emails than prepaid seats count
Given I have purchased <purchasedMembers> member seats
When I add more member emails than pre-paid seats
Then I <canAddMoreMembers> be able to add more member emails
And I <canSeeExtraCostMessage> see a message telling me how much extra I am going to pay
Examples:
| purchasedMembers | canAddMoreMembers | canSeeExtraCostMessage |
| 3 | will | will |
| 6 | will not | will not |
Scenario Outline: Adding more than 6 member emails
Given I am on <membersAllowance> members
And I've used <membersUsed> member seats so far
When I add <membersToAdd> member emails
Then I will not be able to add more member emails
Examples:
| membersAllowance | membersUsed | membersToAdd |
| 3 | 2 | 4 |
| 6 | 3 | 3 |
Scenario: Adding beyond the allowed limit of guests
Given I reach the guests limit when inviting guests
Then I will not be able to enter more emails
Scenario: Opening invite modal when both limits reached
Given I have reached members and guests limits
And I open the invite modal
Then I will see a message telling me to contact Marvel
Scenario: Enterprise message
Given I have reached one of the limits
Then I will be shown a message telling me to upgrade to Enterprise
Scenario: Seats count
Given I am on invite modal
Then I will see seat counts for members and guests