Sha256: 4597d89150403c7313d9f1cb806010d3c52de3dde4cc95ed9a3efc0741fc8640

Contents?: true

Size: 895 Bytes

Versions: 39

Compression:

Stored size: 895 Bytes

Contents

module Spree
  module TestingSupport
    module CheckoutHelpers
      def fill_in_address
        address = 'order_bill_address_attributes'
        fill_in "#{address}_firstname", with: 'Ryan'
        fill_in "#{address}_lastname", with: 'Bigg'
        fill_in "#{address}_address1", with: '143 Swan Street'
        fill_in "#{address}_city", with: 'Richmond'
        select country.name, from: "#{address}_country_id"
        select state.name, from: "#{address}_state_id"
        fill_in "#{address}_zipcode", with: '12345'
        fill_in "#{address}_phone", with: '(555) 555-5555'
      end

      def fill_in_credit_card_info(invalid: false)
        fill_in 'name_on_card', with: 'Spree Commerce'
        fill_in 'card_number', with: invalid ? '123' : '4111 1111 1111 1111'
        fill_in 'card_expiry', with: '12 / 24'
        fill_in 'card_code', with: '123'
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
spree_auth_devise-4.6.3 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.2.4 lib/spree/testing_support/checkout_helpers.rb
spree_auth_devise-4.6.2 lib/spree/testing_support/checkout_helpers.rb
spree_auth_devise-4.6.1 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.2.3 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.2.2 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.2.1 lib/spree/testing_support/checkout_helpers.rb
spree_auth_devise-4.6.0 lib/spree/testing_support/checkout_helpers.rb
spree_auth_devise-4.5.0 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.2.0 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.1.12 lib/spree/testing_support/checkout_helpers.rb
spree_auth_devise-4.4.2 lib/spree/testing_support/checkout_helpers.rb
spree_auth_devise-4.1.1 lib/spree/testing_support/checkout_helpers.rb
spree_auth_devise-4.2.1 lib/spree/testing_support/checkout_helpers.rb
spree_auth_devise-4.4.1 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.1.11 lib/spree/testing_support/checkout_helpers.rb
spree_auth_devise-4.4.0 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.1.10 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.1.9 lib/spree/testing_support/checkout_helpers.rb
spree_dev_tools-0.1.8 lib/spree/testing_support/checkout_helpers.rb