@ows_collaborator
Feature: Collaborator

  Scenario: Collaborators list is displayed
    Given a standalone Workstation e2e_admin_user user
    When I am on the ReactWorkstation::CollaboratorPage
    Then I should see the Collaborators List

  Scenario: Search for a track
    Given a standalone Workstation e2e_admin_user user
    When I am on the ReactWorkstation::CollaboratorPage
    And I begin searching Digital in my catalogue
    Then I am presented with product options for products containing that track

  Scenario: Add collaborator split
    Given a standalone Workstation e2e_admin_user user
    When I am on the ReactWorkstation::CollaboratorPage
    And I search for Digital in my catalogue
    When I add 1 new collaborators
    Then I should see new collaborator in the list

  Scenario: Product splits add up to 100%
    Given a standalone Workstation e2e_admin_user user
    When I am on the ReactWorkstation::CollaboratorPage
    And I search for Digital in my catalogue
    Then The total percentage for the product adds up to 100%

  Scenario: Collaborator percentage cannot exceed 100%
    Given a standalone Workstation e2e_admin_user user
    When I am on the ReactWorkstation::CollaboratorPage
    And I search for Digital in my catalogue
    When I add 3 blank collaborators
    And I set the total percentage to exceed 100%
    Then I should see an error that the total exceeds the maximum percentage

  Scenario: Delete collaborator split
    Given a standalone Workstation e2e_admin_user user
    When I am on the ReactWorkstation::CollaboratorPage
    And I search for Digital in my catalogue
    When I delete all collaborator splits
    Then I should see no collaborators in the list

  Scenario: Generate a collaborator report
    Given a standalone Workstation label_7482 user
    And the feature flag collaborator_splits is enabled
    And the feature flag Collaborators_Functionality is enabled
    When I am on the ReactWorkstation::CollaboratorPage
    And Stuck on the Wall track has at least 1 collaborator
    And I generate a collaborator report
    Then The report should begin generating