Sha256: ba9e0aa3d6e7830d3cbc834108593d0f2ba03d7a8a2dbcb3691e1300ad4a3fa1

Contents?: true

Size: 1 KB

Versions: 7

Compression:

Stored size: 1 KB

Contents

require 'test_helper'
require 'helpers/capybara'

class PaymentWithClientSideEncryptionIntegrationTest < Minitest::Test
  extend Adyen::Test::Flaky
  include Capybara::DSL

  flaky_test "client-side encryption payment flow" do
    page.driver.headers = {
      "Accept" => "text/html;q=0.9,*/*",
      "User-Agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36" #  UUID/#{SecureRandom.uuid}
    }

    visit('/pay')
    fill_in('card[holder_name]',  :with => Adyen::TestCards::VISA[:holder_name])
    fill_in('card[number]',       :with => Adyen::TestCards::VISA[:number])
    fill_in('card[expiry_month]', :with => Adyen::TestCards::VISA[:expiry_month])
    fill_in('card[expiry_year]',  :with => Adyen::TestCards::VISA[:expiry_year])
    fill_in('card[cvc]',          :with => Adyen::TestCards::VISA[:cvc])

    click_button('Pay')

    assert page.has_content?('Payment authorized')
    assert_match /\A\d+\z/, find("#psp_reference").text
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
adyen-2.4.0 test/integration/payment_with_client_side_encryption_integration_test.rb
adyen_jpiqueras-2.5.0 test/integration/payment_with_client_side_encryption_integration_test.rb
adyen-2.3.0 test/integration/payment_with_client_side_encryption_integration_test.rb
adyen_jpiqueras-2.4.0 test/integration/payment_with_client_side_encryption_integration_test.rb
adyen_jpiqueras-2.3.0 test/integration/payment_with_client_side_encryption_integration_test.rb
adyen-2.2.0 test/integration/payment_with_client_side_encryption_integration_test.rb
adyen-2.1.0 test/integration/payment_with_client_side_encryption_integration_test.rb