Sha256: fca94e494100a0073f40fc6a8df4e3e807182b8f484a8199b29c90506e3a4328

Contents?: true

Size: 1.62 KB

Versions: 6

Compression:

Stored size: 1.62 KB

Contents

module Workarea
  decorate Storefront::GuestCheckoutSystemTest, with: :forter do
    def test_failed_fraud_check
      assert_current_path(storefront.checkout_addresses_path)
      fill_in 'email', with: 'decline@workarea.com'
      fill_in_shipping_address
      uncheck 'same_as_shipping'
      fill_in_billing_address
      click_button t('workarea.storefront.checkouts.continue_to_shipping')

      assert_current_path(storefront.checkout_shipping_path)
      click_button t('workarea.storefront.checkouts.continue_to_payment')

      assert_current_path(storefront.checkout_payment_path)
      fill_in_credit_card
      fill_in 'credit_card[number]', with: '1'
      click_button t('workarea.storefront.checkouts.place_order')

      assert_current_path(storefront.checkout_place_order_path)
      assert(page.has_content?('Error'))
    end

    def test_not_reviewed_fraud_check
      assert_current_path(storefront.checkout_addresses_path)
      fill_in 'email', with: 'notreviewed@workarea.com'
      fill_in_shipping_address
      uncheck 'same_as_shipping'
      fill_in_billing_address
      click_button t('workarea.storefront.checkouts.continue_to_shipping')

      assert_current_path(storefront.checkout_shipping_path)
      click_button t('workarea.storefront.checkouts.continue_to_payment')

      assert_current_path(storefront.checkout_payment_path)
      fill_in_credit_card
      fill_in 'credit_card[number]', with: '1'
      click_button t('workarea.storefront.checkouts.place_order')

      assert(page.has_content?('Success'))
      assert(page.has_content?(t('workarea.storefront.flash_messages.order_placed')))
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
workarea-forter-1.3.2 test/system/workarea/storefront/guest_checkout_system_test.decorator
workarea-forter-1.3.1 test/system/workarea/storefront/guest_checkout_system_test.decorator
workarea-forter-1.3.0 test/system/workarea/storefront/guest_checkout_system_test.decorator
workarea-forter-1.2.4 test/system/workarea/storefront/guest_checkout_system_test.decorator
workarea-forter-1.2.3 test/system/workarea/storefront/guest_checkout_system_test.decorator
workarea-forter-1.2.2 test/system/workarea/storefront/guest_checkout_system_test.decorator