@frontend_royalties
@ows_royalties
@ows_abacus_account
Feature: Abacus Account 3

  Background: Clear browser
    Given I have a clear browser

  @ows_ledger
  @id_7aff8b19afc76c305b044cdc3d61ae7a4ed93d7c4d0f2613e329f9869fbb871a
  Scenario: Account's accounting details section
    Given an orchard employee label_7123_admin_3 for Abacus
    And I log in to Abacus silently
    And I am successfully logged in to Abacus
    And I prepare an abacus account data:
      | Key              | Value                   |
      | companyBrandName | awal                    |
      | paidBy           | AWAL-US                 |
      | agreementType    | AWAL Core               |
      | currency         | USD                     |
      | 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 add account's accounting details
    Then I should be able to view account's accounting details section

  @id_684729dabbe03a45c664b72d0d00f8b850d35617b78e4f523aa59b73f5ef1fa2
  Scenario: Search for account by name
    Given an orchard employee label_7123_admin_3 for Abacus
    And I log in to Abacus silently
    And I am successfully logged in to Abacus
    And I prepare an abacus account data:
      | Key              | Value                   |
      | companyBrandName | awal                    |
      | paidBy           | AWAL-US                 |
      | agreementType    | AWAL Core               |
      | currency         | USD                     |
      | owner            | awal                    |
      | paymentMinimum   | 123                     |
      | paymentSchedule  | 45 days after month end |
    And I create 1 new account via API
    Then I should be able to search for an account by name

  @ows_abacus_contract
  @id_2869d2fe6bb6b314a2418ce381bf4c4bedefc07e7ca2aeb8fe69ca1ae82caf6a
  Scenario: Account details page should contain list of contracts account is used in
    Given an orchard employee label_7123_admin_3 for Abacus
    When I log in to Abacus silently
    Then I am successfully logged in to Abacus
    And I prepare an abacus account data:
      | Key              | Value                   |
      | companyBrandName | awal                    |
      | paidBy           | AWAL-US                 |
      | agreementType    | AWAL Core               |
      | currency         | USD                     |
      | 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 see list of contracts of the account

  @ows_abacus_state
  @id_536c3ebaa84eed02707fb7e4098099c0dbc29103b0312c79d5b534262f51c923
  Scenario: Put account's Payment Eligibility on hold/active
    Given an orchard employee label_7123_admin_3 for Abacus
    And I log in to Abacus silently
    And I am successfully logged in to Abacus
    And I prepare an abacus account data:
      | Key              | Value                   |
      | companyBrandName | awal                    |
      | paidBy           | AWAL-US                 |
      | agreementType    | AWAL Core               |
      | currency         | USD                     |
      | owner            | awal                    |
      | paymentMinimum   | 123                     |
      | paymentSchedule  | 45 days after month end |
    And I create 1 new account via API
    And I should be able to put account's Payment Eligibility on hold
    Then I should be able to view account's payment hold history
    And I should be able to remove account's payment hold

  @id_276c3ebaa84eed02707fb7e3028099c0dbc29103b0312c79d5b775262f51c865
  Scenario: Account's accounting details section filters
    Given an orchard employee label_7123_admin_3 for Abacus
    And I log in to Abacus silently
    And I am successfully logged in to Abacus
    Then I should be able to search for an accounting activity by event name
    Then I should be able to search for an accounting activity by contract
    Then I should be able to search for an accounting activity by statement period
