Sha256: c3a425deb4fe21b08363f74c98435654d89d3676b71a0252c815082f1e8144b6

Contents?: true

Size: 1.27 KB

Versions: 62

Compression:

Stored size: 1.27 KB

Contents

require 'test_helper'

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

      def test_copy_from_product_show
        product = create_product

        visit admin.catalog_product_path(product)
        click_link t('workarea.admin.catalog_products.show.copy_product')

        fill_in 'product[id]', with: 'FOOBAR'

        click_button 'create_copy'
        assert(page.has_content?('Success'))
        assert_current_path(
          admin.edit_create_catalog_product_path(
            "#{product.slug}-1",
            continue: true
          )
        )
      end

      def test_copy_from_create_workflow
        create_product(name: 'Original Product')

        visit admin.create_catalog_products_path
        click_link t('workarea.admin.create_catalog_products.setup.copy_button')

        find('.select2-selection--single').click
        find('.select2-results__option', text: 'Original Product').click

        fill_in 'product[id]', with: 'FOOBAR'

        click_button 'create_copy'
        assert(page.has_content?('Success'))
        assert_current_path(
          admin.edit_create_catalog_product_path(
            'original-product-1',
            continue: true
          )
        )
      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/product_copy_system_test.rb
workarea-admin-3.5.26 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.4.45 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.5.25 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.5.23 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.4.44 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.5.22 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.4.43 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.5.21 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.4.42 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.5.20 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.4.41 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.5.19 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.4.40 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.5.18 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.4.39 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.5.17 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.4.38 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.5.16 test/system/workarea/admin/product_copy_system_test.rb
workarea-admin-3.4.37 test/system/workarea/admin/product_copy_system_test.rb