Sha256: a7016ba4788587f42b4cfeaabd22e361bdff87458098ec6f24aec7d10984c1c7

Contents?: true

Size: 1.3 KB

Versions: 34

Compression:

Stored size: 1.3 KB

Contents

require 'test_helper'

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

      def test_managing_featured_products
        create_product(name: 'Foo')
        create_product(name: 'Bar')
        category = create_category
        visit admin.catalog_category_path(category)

        click_link t('workarea.admin.catalog_categories.cards.featured_products.title')
        assert(page.has_content?('Foo'))
        assert(page.has_content?('Bar'))

        click_link 'Foo'
        assert(page.has_content?('Success'))
        assert(page.has_selector?('.product-summary__remove'))
        click_link t('workarea.admin.featured_products.select.sort_link')

        assert(page.has_content?('Foo'))
        assert(page.has_no_content?('Bar'))
        click_link t('workarea.admin.featured_products.edit.browse_link')

        assert(page.has_selector?('.product-summary__remove'))
        click_link 'Foo'
        assert(page.has_content?('Success'))
        assert(page.has_no_selector?('.product-summary__remove'))
        click_link t('workarea.admin.featured_products.select.sort_link')

        assert(page.has_no_content?('Foo'))
        assert(page.has_no_content?('Bar'))
        assert(page.has_no_selector?('#product_ids_'))
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-admin-3.4.45 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.44 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.43 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.42 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.41 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.40 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.39 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.38 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.37 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.36 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.35 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.34 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.33 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.32 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.31 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.30 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.29 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.28 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.27 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.26 test/system/workarea/admin/featured_products_system_test.rb