Sha256: e2cbcf34aee376fba810a9e25f8c7c719f301a5859a08f6da445ee3ee396f993

Contents?: true

Size: 852 Bytes

Versions: 56

Compression:

Stored size: 852 Bytes

Contents

if ENV['BROWSER'] && ENV['BROWSER'] != 'phantom'
  require 'spec_helper'

  describe 'url features', type: :feature, sauce: true do
    it 'should update the page when using the back button' do
      visit '/'
      expect(current_url).to match(/\/$/)

      click_link 'Bindings'
      expect(current_url).to match(/\/bindings$/)
      expect(page).to have_content('Checkbox')

      click_link 'Todos'
      expect(current_url).to match(/\/todos$/)
      expect(page).to have_content('Todos Example')

      # "Click" back button
      page.evaluate_script('window.history.back()')

      click_link 'Bindings'
      expect(current_url).to match(/\/bindings$/)
      expect(page).to have_content('Checkbox')

      # "Click" back button
      page.evaluate_script('window.history.back()')

      expect(current_url).to match(/\/$/)
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
volt-0.9.7.pre8 spec/integration/url_spec.rb
volt-0.9.7.pre7 spec/integration/url_spec.rb
volt-0.9.7.pre6 spec/integration/url_spec.rb
volt-0.9.7.pre5 spec/integration/url_spec.rb
volt-0.9.7.pre3 spec/integration/url_spec.rb
volt-0.9.7.pre2 spec/integration/url_spec.rb
volt-0.9.6 spec/integration/url_spec.rb
volt-0.9.6.pre3 spec/integration/url_spec.rb
volt-0.9.6.pre2 spec/integration/url_spec.rb
volt-0.9.6.pre1 spec/integration/url_spec.rb
volt-0.9.5 spec/integration/url_spec.rb
volt-0.9.5.pre12 spec/integration/url_spec.rb
volt-0.9.5.pre11 spec/integration/url_spec.rb
volt-0.9.5.pre9 spec/integration/url_spec.rb
volt-0.9.5.pre8 spec/integration/url_spec.rb
volt-0.9.5.pre7 spec/integration/url_spec.rb
volt-0.9.5.pre6 spec/integration/url_spec.rb
volt-0.9.5.pre5 spec/integration/url_spec.rb
volt-0.9.5.pre4 spec/integration/url_spec.rb
volt-0.9.5.pre3 spec/integration/url_spec.rb