Sha256: 105dd87468941dcbbb992528273d36417c62060f109f215439da11afce7f8b5a

Contents?: true

Size: 707 Bytes

Versions: 4

Compression:

Stored size: 707 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    class TrustpilotScriptSystemTest < Workarea::SystemTest
      include Storefront::SystemTest
      def test_trustpilot_script
        Workarea.with_config do |config|
          config.trustpilot_key = '2fBeAHvcRSrEVUcB'
          visit storefront.root_path

          assert page.has_xpath?('//div[@id="tp-snippet"]')

          config.trustpilot_key = nil
          visit storefront.root_path
          
          assert page.has_no_xpath?('//div[@id="tp-snippet"]')
        end
      end

      def test_trustbox_widget
        visit storefront.root_path
        assert(page.has_no_selector?('.trustpilot-widget'))
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
workarea-trustpilot_reviews-1.0.4.pre test/system/workarea/storefront/trustpilot_script_system_test.rb
workarea-trustpilot_reviews-1.0.3.pre test/system/workarea/storefront/trustpilot_script_system_test.rb
workarea-trustpilot_reviews-1.0.2.pre test/system/workarea/storefront/trustpilot_script_system_test.rb
workarea-trustpilot_reviews-1.0.0.pre test/system/workarea/storefront/trustpilot_script_system_test.rb