@frontend_royalties
@ows_abacus_contract
Feature: abacus contract lifecycle - contract statuses

  @id_de555f6cba732c17337efc663388ccab8df994bb63018c14bc140bb1176e28cb
  Scenario: set contract to termination/terminate/reactivate
    Given an orchard employee label_7123_admin_4 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 a new active account via API
    And I have a Distribution runcontroller created
    And I prepare an abacus contract data:
      | Key           | Value                         |
      | contractType  | Distribution                  |
      | signingEntity | AWAL Recordings America, Inc. |
      | renewalRule   | Continuously Active           |
    And I should be able to create Active contract with this data via new flow
    Then I should be able to set contract for termination
    And I should be able to reactivate the contract
    And I should be able to terminate the contract
    And I should be able to reactivate the contract

  @id_4b33d4d2ff47a24bb098f09bd0ff4049aaa4f7fa1d2ecd80c4c97d95d266d211
  Scenario: Not Yet Active contract
    Given an orchard employee label_7123_admin_4 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 a new active account via API
    And I have a Distribution runcontroller created
    And I prepare an abacus contract data:
      | Key           | Value                         |
      | contractType  | Distribution                  |
      | signingEntity | AWAL Recordings America, Inc. |
      | renewalRule   | Continuously Active           |
    And I should be able to create Not Yet Active contract with this data via new flow
