Sha256: 056651efb64e3b1da1ffd4ddc30259cda9ae61ec28bab4c32fc3918bff4371f6

Contents?: true

Size: 761 Bytes

Versions: 2

Compression:

Stored size: 761 Bytes

Contents

require 'test_helper'

module Workarea
  class WebWidgetSystemTest < Workarea::SystemTest
    def test_callrail_script
      Workarea.with_config do |config|
        config.callrail_script_src = '//cdn.callrail.com/companies/12/swap.js'
        visit storefront.root_path

        assert page.has_xpath?('//script[@id="cr-snippet"]', visible: false)

        config.callrail_script_src = nil
        visit storefront.root_path
        
        assert page.has_no_xpath?('//script[@id="cr-snippet"]', visible: false)
      end
    end

    def test_tracking_num
      Workarea.with_config do |config|
        config.callrail_target_num = '8205823687'
        visit storefront.root_path

        assert(page.has_content?('5862108932'))
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-callrail-1.0.2.pre test/system/workarea/storefront/web_widget_system_test.rb
workarea-callrail-1.0.1.pre test/system/workarea/storefront/web_widget_system_test.rb