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.26 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.5.3 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.25 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.5.2 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.24 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.5.1 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.23 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.22 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.5.0 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.21 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.5.0.beta.1 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.20 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.19 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.18 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.17 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.16 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.15 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.14 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.13 test/performance/workarea/storefront/pages_performance_test.rb
workarea-storefront-3.4.12 test/performance/workarea/storefront/pages_performance_test.rb