Sha256: 64baa8414d8bf62738911672c28f74f5194fde43bf480d17690b99647b6298f8

Contents?: true

Size: 852 Bytes

Versions: 9

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

9 entries across 9 versions & 1 rubygems

Version Path
volt-0.8.27.beta2 spec/integration/url_spec.rb
volt-0.8.27.beta1 spec/integration/url_spec.rb
volt-0.8.26.beta1 spec/integration/url_spec.rb
volt-0.8.26 spec/integration/url_spec.rb
volt-0.8.24 spec/integration/url_spec.rb
volt-0.8.23 spec/integration/url_spec.rb
volt-0.8.22 spec/integration/url_spec.rb
volt-0.8.22.beta2 spec/integration/url_spec.rb
volt-0.8.22.beta1 spec/integration/url_spec.rb