Sha256: 7057ea34003f4bf65676609362496a46dc6deb9b85c688daf6cd4becba4fc197

Contents?: true

Size: 831 Bytes

Versions: 22

Compression:

Stored size: 831 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)

        Configuration::ContentBlocks.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

22 entries across 22 versions & 1 rubygems

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