Feature: Provider Credit Card Details
  In order to pay to our master

  Background:
    Given a provider "foo.example.com"
    And provider "master" manages payments with "braintree_blue"
    And provider "master" has testing credentials for braintree

  Scenario: Upload logo
    Given current domain is the admin domain of provider "foo.example.com"
      And I log in as provider "foo.example.com"
    When I follow "Account"
      And I follow "Credit Card Details"
    Then I should be on the provider braintree credit card details page
      And I follow "Edit credit card details"

    Then I should be on the provider edit account page
    And I should see "Edit Account Details"
    And fill in "Organization/Group Name" with "coconut"
    And fill in "State / Region" with "foo"
    And fill in "City" with "foo"
    And fill in "ZIP Code" with "foo"
    And fill in "VAT Code" with "foo"
    And I select "Spain" from "Country"
    And I press "Save and continue with credit card"
    Then I should see "Credit Card and Billing Address"
