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.25 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.24 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.23 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.22 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.21 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.20 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.19 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.18 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.17 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.16 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.15 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.14 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.13 test/system/workarea/admin/featured_products_system_test.rb
workarea-admin-3.4.12 test/system/workarea/admin/featured_products_system_test.rb