@frontend_royalties
@ows_royalties
@ows_abacus_contract
Feature: Abacus Contracts 1

  @ows_abacus_account
  @id_1deb7f3fd7f3b8779237f07921e3203a9a3dac7ab2d5ad5ca0c31e403082625a
  Scenario Outline: Add Contract
    Given an orchard employee label_7123_admin_5 for abacus
    When I log in
    And I prepare an abacus account data:
      | Key              | Value                   |
      | companyBrandName | awal                    |
      | paidBy           | AWAL-US                 |
      | agreementType    | AWAL Core               |
      | currency         | EUR                     |
      | owner            | awal                    |
      | paymentMinimum   | 123                     |
      | paymentSchedule  | 45 days after month end |
    And I create 1 new account via API
    And I have a <type> runcontroller created
    And I have a new <type> contract lifecycle created with accounts created for AWAL Recordings America, Inc.

    Examples:
      | type                          |
      | Distribution                  |
      | Performer Neighbouring Rights |

  @id_f6a43d827f93cb9aa414e65bc342eea82135c90f04c70e1b8c040e08f7a9d757
  Scenario Outline: Add Distribution contract terms
    Given an orchard employee label_7123_admin_2 for abacus
    And I log in
    And I prepare an abacus account data:
      | Key              | Value                   |
      | companyBrandName | awal                    |
      | paidBy           | AWAL-US                 |
      | agreementType    | AWAL Core               |
      | currency         | EUR                     |
      | owner            | awal                    |
      | paymentMinimum   | 123                     |
      | paymentSchedule  | 45 days after month end |
    And I create 1 new active account via API
    And I have a Distribution runcontroller created
    And I have a new Distribution contract lifecycle created with accounts created for AWAL Recordings America, Inc.
    Then I should be able to fill <type> contract term details

    Examples:
      | type    |
      | Label   |
      | Product |
      | Track   |

  @id_bab4d421a28f587f43cfef719db550d8f7cca2cee7a7c71ae58dfc4769103a38
  Scenario: Distribution contract terms order grouping
    Given an orchard employee label_7123_admin_2 for abacus
    And I log in
    And I navigate to the contract with multiple terms
    Then I should see contract terms in correct order
