Sha256: fd9ea8e61640715a2176dc40d2f53dc540b3426b38e6bfb47871088aee27834b

Contents?: true

Size: 860 Bytes

Versions: 28

Compression:

Stored size: 860 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    class RecentViewsIntegrationTest < Workarea::IntegrationTest
      def test_show
        password = 'W3bl1nc!'
        user = create_user(password: password)
        category = create_category
        product = create_product
        Metrics::User.save_affinity(
          id: user.email,
          action: 'viewed',
          product_ids: [product.id]
        )

        post storefront.login_path,
          params: { email: user.email, password: password }

        assert_redirected_to(storefront.users_account_path)
        refute(session[:user_id].blank?)

        product_url = storefront.product_path(product, via: category.id)
        get storefront.recent_views_path(via: category.id)
        assert_select(%(.product-summary__name a[href="#{product_url}"]))
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-storefront-3.5.27 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.26 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.25 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.23 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.22 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.21 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.20 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.19 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.18 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.17 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.16 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.15 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.14 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.13 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.12 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.11 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.10 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.9 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.8 test/integration/workarea/storefront/recent_views_integration_test.rb
workarea-storefront-3.5.7 test/integration/workarea/storefront/recent_views_integration_test.rb