Sha256: 5a194c6df288681b3b77568484cea459a5cc4595ab545ccd643fa8204001f685

Contents?: true

Size: 1.14 KB

Versions: 30

Compression:

Stored size: 1.14 KB

Contents

module CheckoutTestHelper

  def add_item_to_cart(name)
    click_link name
    click_button 'Add to cart'
  end

  def enter_valid_email_address
    fill_in 'Your email address', with: 'john@example.com'
  end

  def enter_valid_shipping_address
    {first_name: 'Neeaj',
     last_name: 'Singh', 
     address1: '100 N. Miami Ave', 
     address2: 'Suite #500',
     city: 'Miami', 
     zipcode: '33333'}.each do |key, value|
      fill_in "order_shipping_address_attributes_#{key}", with: value
    end

    select  'United States',  from: "order_shipping_address_attributes_country_code"
    select  'Florida',        from: "order_shipping_address_attributes_state_code"
  end

  def enter_valid_billing_address
    {first_name: 'Neil', 
     last_name: 'Singh', 
     address1: '100 N. Pines Ave', 
     address2: 'Suite #400',
     city: 'Pembroke Pines', 
     zipcode: '33332'}.each do |key, value|
      fill_in "order_billing_address_attributes_#{key}", with: value
    end

    select  'United States',  from: "order_billing_address_attributes_country_code"
    select  'Florida',        from: "order_billing_address_attributes_state_code"
  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
nimbleshop_core-0.0.23 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.21 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.20 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.19 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.17 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.16 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.15 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.14 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.14.rc2 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.14.rc1 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.13 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.12 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.11 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.10 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.9 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.8 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.7 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.5 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.4.beta1 test/support/checkout_test_helper.rb
nimbleshop_core-0.0.4 test/support/checkout_test_helper.rb