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.27 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.26 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.45 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.25 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.23 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.44 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.22 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.43 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.21 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.42 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.20 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.41 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.19 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.40 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.18 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.39 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.17 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.38 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.5.16 test/system/workarea/admin/imports_system_test.rb
workarea-admin-3.4.37 test/system/workarea/admin/imports_system_test.rb