@frontend_royalties
@ows_royalties
@ows_abacus_contract
Feature: Abacus Contracts 2

  @id_451c44aaa4d3c130e785919728aff572879fa32fda0f270cd93a4a30779e4cd9
  Scenario Outline: add contract base 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 <base_terms_type> contract term details

    Examples:
      | base_terms_type |
      | Label           |
      | Product         |
      | Track           |

  @id_a9e04e22116f8ffab5f1556ebe7fea00bfacbfa913e0b3125d7d0c41a1908c77
  Scenario: edit contract base 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 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 Label contract term details
    And I should be able to edit Label contract term details

  @id_ee732b50acbed8c72ede09e0530355fa9dd4f0dadbb95962149847f742c1fa71
  Scenario: add contract base terms with no UPC/ISRC
    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 Product contract term with no UPC
    Then I should be able to fill Track contract term with no ISRC

  @ACC-8965
  @id_a743f324b6aae7f7ec36aab4529492ba848f6f295a81d8835c0d488079d5f415
  Scenario: remove products/tracks from 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 Label contract term details
    Then I should be able to fill Product contract term details
    And I should be able to remove Product from contract terms
    Then I should be able to fill Track contract term details
    And I should be able to remove Track from contract terms
