Sha256: 6330429d561cc682230ce8470deb089f4b9b52b6031aff82b63e818d9b40933d

Contents?: true

Size: 885 Bytes

Versions: 19

Compression:

Stored size: 885 Bytes

Contents

require 'support/capybara_app_helper'

RSpec.describe "Zanox Integration" do

  before do
    setup_app(action: :zanox) do |tracker|
      tracker.handler(:zanox, { account_id: '12345H123456789' } )
    end

    visit '/'
  end

  subject { page }

  it 'should include the mastertag event' do
    expect(page.find("body")).to have_content "window._zx.push({\"id\": \"blurg567\"});"
    expect(page).to have_content "var zx_category = \"cake decorating\";\nvar zx_amount = \"5.90\";\n"
  end

  it 'should include the sale event' do
    expect(page).to have_xpath "//script[contains(@src,'pps/?12345H123456789&mode=[[1]]&CustomerID=[[123456]]&OrderID=[[DEFC-4321]]&CurrencySymbol=[[EUR]]&TotalPrice=[[150.00]]')]"
  end

  it 'should include the lead event' do
    expect(page).to have_xpath "//script[contains(@src,'ppl/?12345H123456789&mode=[[1]]&CustomerID=[[654321]]')]"
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rack-tracker-1.13.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.12.1 spec/integration/zanox_integration_spec.rb
rack-tracker-1.12.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.11.2 spec/integration/zanox_integration_spec.rb
rack-tracker-1.11.1 spec/integration/zanox_integration_spec.rb
rack-tracker-1.11.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.10.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.9.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.8.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.7.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.6.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.5.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.4.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.3.1 spec/integration/zanox_integration_spec.rb
rack-tracker-1.3.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.2.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.1.0 spec/integration/zanox_integration_spec.rb
rack-tracker-1.0.2 spec/integration/zanox_integration_spec.rb
rack-tracker-1.0.1 spec/integration/zanox_integration_spec.rb