Sha256: 17f82d5244d8c7aa245d72f9f3e7e48b29e3c99de9edeb1ca20a06fac50bcd2c

Contents?: true

Size: 935 Bytes

Versions: 3

Compression:

Stored size: 935 Bytes

Contents

module Workarea
  decorate Storefront::OrdersSystemTest, with: :cim do
    def test_showing_refunds
      payment = Payment.find(@order.id)
      amounts = payment.tenders.reduce({}) { |m, t| m.merge(t.id => t.amount) }

      Payment::Capture.new(payment: payment, amounts: amounts).complete!

      age_capture_or_purchase_transactions_for(payment)

      Payment::Refund.new(payment: payment, amounts: amounts).complete!

      visit storefront.check_orders_path

      within '#single_order_lookup_form' do
        fill_in 'order_id', with: '1234'
        fill_in 'postal_code', with: '19106'
        click_button t('workarea.storefront.orders.lookup_order')
      end

      assert_current_path(storefront.order_path('1234'))

      assert(page.has_content?('1234'))
      assert(page.has_content?(t('workarea.storefront.orders.refunds')))
      assert(page.has_content?(t('workarea.storefront.orders.issued')))
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
workarea-authorize_cim-2.1.3 test/system/workarea/storefront/orders_system_test.decorator
workarea-authorize_cim-2.1.2 test/system/workarea/storefront/orders_system_test.decorator
workarea-authorize_cim-2.1.1 test/system/workarea/storefront/orders_system_test.decorator