@frontend_royalties
@ows_royalties
@ows_abacus_account
Feature: Abacus Account 1

  @id_1a6d5e89e3570cdf70cb58c1f3e8dd01fabe934fc61103b0d015cd878c75d004
  Scenario: Move Payoneer Program from payoneer_whitelabel to preexisting_payoneer_account
    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           | ORCHARD-US              |
      | agreementType    | Orchard                 |
      | paymentMethod    | payoneer_whitelabel     |
      | currency         | USD                     |
      | owner            | awal                    |
      | paymentMinimum   | 321                     |
      | paymentSchedule  | 30 days after month end |
    And I create a new active account via API
    Then I change account payment method to "preexisting_payoneer_account" for "Orchard" agreement with message:
      """
      Changes May Trigger Program UpdateUpdating these fields may move the client to a new Payoneer program. Banking must be set up again before payments can be processed
      """
    Then I should be able to verify account generals details is changed and contain preexisting_payoneer_account
    Then tax_eligibility is set to "init"
    Then payment_eligibility is set to "init"

  @id_0cfa47a6283112d7e54192efb72e719ddff3f056ab539f4b184dfaf3fbe14811
  Scenario: Move Payoneer Program from payoneer_whitelabel to payoneer_wire
    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           | ORCHARD-US              |
      | agreementType    | Orchard                 |
      | paymentMethod    | payoneer_whitelabel     |
      | currency         | USD                     |
      | owner            | awal                    |
      | paymentMinimum   | 321                     |
      | paymentSchedule  | 30 days after month end |
    And I create a new active account via API
    Then I change account payment method to "payoneer_wire" for "Orchard" agreement
    Then I should be able to verify account generals details is changed and contain payoneer_wire
    Then tax_eligibility is set to "init"
    Then payment_eligibility is set to "approved"

  @id_3c3e6dc39016becf1ae38c7afabe7f1d6d1864db44674b8a6b986791257741bb
  Scenario: Move Payoneer Program from payoneer_wire to preexisting_payoneer_account
    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           | ORCHARD-US              |
      | agreementType    | Orchard                 |
      | paymentMethod    | payoneer_wire           |
      | currency         | USD                     |
      | owner            | awal                    |
      | paymentMinimum   | 321                     |
      | paymentSchedule  | 30 days after month end |
    And I create a new account via API
    Then I change account payment method to "preexisting_payoneer_account" for "Orchard" agreement with message:
      """
      Changes May Trigger Program UpdateUpdating these fields may move the client to a new Payoneer program. Banking must be set up again before payments can be processed
      """
    Then I should be able to verify account generals details is changed and contain preexisting_payoneer_account
    Then tax_eligibility is set to "init"
    Then payment_eligibility is set to "init"

  @id_62210b834812c9e1005ba794a3f595ffd486ca98cd9a8c655145d06940e47763
  Scenario: Move Payoneer Program from payoneer_wire to payoneer_whitelabel
    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           | ORCHARD-US              |
      | agreementType    | Orchard                 |
      | paymentMethod    | payoneer_wire           |
      | currency         | USD                     |
      | owner            | awal                    |
      | paymentMinimum   | 321                     |
      | paymentSchedule  | 30 days after month end |
    And I create a new active account via API
    Then I change account payment method to "payoneer_whitelabel" for "Orchard" agreement
    Then I should be able to verify account generals details is changed and contain payoneer_whitelabel
    Then tax_eligibility is set to "init"
    Then payment_eligibility is set to "approved"

  @id_89021be7668543d5ccbb31bff300e48784a4edeb82e7fd22b7d57a1d27512589
  Scenario: Move Payoneer Program from preexisting_payoneer_account to payoneer_wire
    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           | ORCHARD-US                   |
      | agreementType    | Orchard                      |
      | paymentMethod    | preexisting_payoneer_account |
      | currency         | USD                          |
      | owner            | awal                         |
      | paymentMinimum   | 321                          |
      | paymentSchedule  | 30 days after month end      |
    And I create a new active account via API
    Then I change account payment method to "payoneer_wire" for "Orchard" agreement with message:
      """
      Changes May Trigger Program UpdateUpdating these fields may move the client to a new Payoneer program. Banking must be set up again before payments can be processed
      """
    Then I should be able to verify account generals details is changed and contain payoneer_wire
    Then tax_eligibility is set to "init"
    Then payment_eligibility is set to "approved"

  @id_4becead293379e61b1ef298bd5c703c297bb9c35c44c62325172684e01ae1688
  Scenario: Move Payoneer Program from preexisting_payoneer_account to payoneer_whitelabel
    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           | ORCHARD-US                   |
      | agreementType    | Orchard                      |
      | paymentMethod    | preexisting_payoneer_account |
      | currency         | EUR                          |
      | owner            | awal                         |
      | paymentMinimum   | 321                          |
      | paymentSchedule  | 30 days after month end      |
    And I create a new active account via API
    Then I change account payment method to "payoneer_whitelabel" for "Orchard" agreement with message:
      """
      Changes May Trigger Program UpdateUpdating these fields may move the client to a new Payoneer program. Banking must be set up again before payments can be processed
      """
    Then I should be able to verify account generals details is changed and contain payoneer_whitelabel
    Then tax_eligibility is set to "init"
    Then payment_eligibility is set to "approved"

  @id_44a31df94b0a0dca7527bef49de901ad73c2d65b819aef9aae3a043dd48af178
  Scenario: Move Payoneer Program from PAYCHEX to payoneer_whitelabel
    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           | ORCHARD-US                   |
      | agreementType    | Orchard                      |
      | paymentMethod    | preexisting_payoneer_account |
      | currency         | EUR                          |
      | owner            | awal                         |
      | paymentMinimum   | 321                          |
      | paymentSchedule  | 30 days after month end      |
    And I create a new active account via API
    And I update payment method in DB to PAYCHEX
    Then I change account payment method to "payoneer_whitelabel" for "Orchard" agreement with message:
      """
      Changes May Trigger Program UpdateUpdating these fields may move the client to a new Payoneer program. Banking must be set up again before payments can be processed
      """
    Then I should be able to verify account generals details is changed and contain payoneer_whitelabel
    Then tax_eligibility is set to "init"
    Then payment_eligibility is set to "approved"
