Sha256: 6236b7af9def1c2955263b72b1a9f420310f8c915edad2a4f0d1f5eb4e42535e

Contents?: true

Size: 832 Bytes

Versions: 40

Compression:

Stored size: 832 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    class PagesPerformanceTest < Workarea::PerformanceTest
      setup :setup_page

      def setup_page
        @page = create_page
        content = Content.for(@page)

        # Providing data for dynamic blocks to use
        @products = Array.new(6) { create_product }
        @categories = Array.new(3) { create_category(product_ids: @products.map(&:id)) }
        create_taxon(navigable: @categories.first)
        create_taxon(navigable: @page)

        Workarea.config.content_block_types.each do |type|
          3.times { content.blocks.build(type_id: type.id, data: type.defaults) }
        end

        content.save!
      end

      def test_heavy_content_pages
        get storefront.page_path(@page)
        assert(response.ok?)
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
workarea-storefront-3.4.45 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.44 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.43 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.42 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.41 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.40 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.39 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.38 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.37 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.36 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.35 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.34 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.33 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.32 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.31 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.30 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.29 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.28 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.27 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.5.4 test/performance/workarea/storefront/pages_performance_test.rb