@documents
@ows_abacus_state
@lambda_documents_payee
Feature: EUR Bank Details - Payoneer and Abacus Approved for Spain and US

  Background: Artist Page - Streams and Sources tab is opened
    Given an orchard employee label_6971 for documents
    Then I update abacus state table and delete Payoneer account 793234

  @id_746ca0980025c4ead5e4c5405eeb46da62e1eebe7386bd98aed6dc6561ac41e6
  Scenario Outline: Eur Bank Details approved for Business Account and Personal Bank Account type
    When I log in to documents
    Then I am successfully logged in to documents
    Then I can see that documents Banking & Tax Settings page works with whitelabel Norway account name ORCHARD-NO-TEST_ACCOUNT
    Then I can see empty Bank Details
    And I add company details for <country> for Business Account account type
    Then I click next on Bank Details form
    And I add Personal bank account for <country>
    Then I submit the bank details form
    And I can see that status is changed to Bank details in review
    Then I log out of documents
    Given an orchard employee label_7123_admin_1 for abacus ignoring host override
    When I log in to Abacus
    And I am successfully logged in to Abacus
    Then I can find account by account name and go to info tab ORCHARD-NO-TEST_ACCOUNT
    Then I set bank details status as payoneer with webhook to approved
    And I can see that Payment details status is Received on
    And I can see that Payment details status is Bank details have passed KYC checks
    And I can see that Payment details status is Review Bank Details
    Then I approve Banking Details
    Then I log out of abacus
    Given an orchard employee label_6971 for documents
    When I log in to documents
    Then I am successfully logged in to documents
    Then I can see that documents Banking & Tax Settings page works with whitelabel Norway account name ORCHARD-NO-TEST_ACCOUNT
    And I can see that status is changed to Bank details were successfully approved. You can now dismiss this message
    And I can see that Bank Details updated for private account in country <country>
    Then I log out of documents

    Examples:
      | country |
      | es_eur  |
      | us_usd  |

  @id_0a4f031da0a4fd8d7f8bff36f917a5c19ebf8a5e679af8841524d2caee44048e
  Scenario Outline: Eur Bank Details approved for Personal Account and Company Bank Account type and I can edit Bank Details
    When I log in to documents
    Then I am successfully logged in to documents
    Then I can see that documents Banking & Tax Settings page works with whitelabel Norway account name ORCHARD-NO-TEST_ACCOUNT
    Then I can see empty Bank Details
    And I add company details for <country> for Personal Account account type
    And I set email for Personal account
    Then I click next on Bank Details form
    And I add Company bank account for <country>
    Then I submit the bank details form
    And I can see that status is changed to Bank details in review
    Then I log out of documents
    Given an orchard employee label_7123_admin_1 for abacus ignoring host override
    When I log in to Abacus
    And I am successfully logged in to Abacus
    Then I can find account by account name and go to info tab ORCHARD-NO-TEST_ACCOUNT
    Then I set bank details status as payoneer with webhook to approved
    And I can see that Payment details status is Received on
    And I can see that Payment details status is Bank details have passed KYC checks
    And I can see that Payment details status is Review Bank Details
    Then I approve Banking Details
    Then I log out of abacus
    Given an orchard employee label_6971 for documents
    When I log in to documents
    Then I am successfully logged in to documents
    Then I can see that documents Banking & Tax Settings page works with whitelabel Norway account name ORCHARD-NO-TEST_ACCOUNT
    And I can see that status is changed to Bank details were successfully approved. You can now dismiss this message
    And I can see that Bank Details updated for private account in country <country>
    Then I log out of documents

    Examples:
      | country |
      | es_eur  |
      | us_usd  |
