Sha256: b26f34aff5a7e74d932ea5c4a7134a4750501595180009288bd0e0a916045c21

Contents?: true

Size: 839 Bytes

Versions: 4

Compression:

Stored size: 839 Bytes

Contents

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

  describe 'url features', type: :feature 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

4 entries across 4 versions & 1 rubygems

Version Path
volt-0.8.21 spec/integration/url_spec.rb
volt-0.8.20 spec/integration/url_spec.rb
volt-0.8.19 spec/integration/url_spec.rb
volt-0.8.18 spec/integration/url_spec.rb