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

  Background:
    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                 |
      | currency         | USD                     |
      | owner            | awal                    |
      | paymentMethod    | payoneer_whitelabel     |
      | paymentMinimum   | 123                     |
      | paymentSchedule  | 45 days after month end |
    When I send request to create 1 account via API
    When I grant payee_management access for label_6971 to the created account via API
    And I fill general details
    Then I update payoneer id in DB to 100246490

  @id_6c0e31df896d51aaa38ef089ebce5d000fcff28129a50192ced79d2a866c5005
  Scenario: Eur Bank Details approved for US Business Account and Personal Bank Account type
    Given an orchard employee label_6971 for documents
    When I log in
    When I can see that documents Banking & Tax Settings page works for created account
    When I delete Payoneer account for created account
    Then I can see empty Bank Details
    When I add company details for United States for Business Account account type
    When I set email for Personal account
    Then I check that button Next is disabled
    Then I set valid phone number 12345678***
    Then I click next on Bank Details form
    When I add Personal bank account for United States and USD
    Then I submit the bank details form
    And I can see that status is changed to Bank details in review
    Given an orchard employee label_7123_admin_5 for abacus
    When I log in
    Then I should be able to search for an account by name with navigation true
    And I can see that Payment details status is Received on
    Then I can see Payment Data section with masked values
    Then I set bank details status as payoneer with webhook to approved
    And I can see that Payment details status is Bank details have passed KYC checks
    Then I can see Payment Data section with masked values
    And I can see that Payment details status is Review Bank Details
    Then I can see Payment Data section with masked values
    Then I approve Banking Details
    Then I can see that Approved Payment data in abacus
    Then I log out
    Given an orchard employee abacus+readonly_e2e_1@sonymusic-pde.com for abacus
    When I log in
    Then I should be able to search for an account by name with navigation true
    Then I can not see Payment Data section with masked values
    Given an orchard employee label_6971 for documents
    When I log in
    When I can see that documents Banking & Tax Settings page works for created account
    And I can see that status is changed to Bank details were successfully approved. You can now dismiss this message
    When I check that Bank Details updated for account
