Sha256: 12655a0e14437bef2702c2d2da71f17754d93735f19e3c526208253608898101

Contents?: true

Size: 1.12 KB

Versions: 62

Compression:

Stored size: 1.12 KB

Contents

require 'test_helper'

module Workarea
  module Admin
    class ImportsSystemTest < SystemTest
      include Admin::IntegrationTest

      def test_importing_products
        2.times { create_product } # samples

        visit admin.catalog_products_path
        click_link t('workarea.admin.shared.bulk_actions.import')

        assert_current_path(
          admin.new_data_file_import_path(
            return_to: admin.catalog_products_path,
            model_type: Workarea::Catalog::Product
          )
        )

        Workarea.config.data_file_formats[1..-1].each do |format|
          click_link format.upcase
          assert(page.has_content?(format.upcase))
        end
      end

      def test_importing_taxes
        category = create_tax_category

        visit admin.tax_category_path(category)

        click_link t('workarea.admin.tax_categories.cards.rates.title')
        click_link 'bulk_import'
        attach_file 'import[file]', tax_rates_csv_path
        click_button 'create_import'

        assert_current_path(admin.tax_category_path(category))
        assert(page.has_content?('Success'))
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.15 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.36 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.14 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.35 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.13 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.34 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.12 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.33 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.11 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.10 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.32 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.9 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.31 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.8 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.30 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.7 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.29 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.6 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.28 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.5 test/system/workarea/admin/imports_system_test.rb