Sha256: 50d5c13c06c28fd539a19020b3aedc4b420f4e5e6b16f348c168ae403b190be4

Contents?: true

Size: 1008 Bytes

Versions: 46

Compression:

Stored size: 1008 Bytes

Contents

require 'spec_helper'

describe 'cookies collection', type: :feature, sauce: true do
  if ENV['BROWSER'] != 'phantom'
    # TODO: fails in phantom for some reason
    it 'should add' do
      visit '/'

      click_link 'Cookies'

      fill_in('cookieName', with: 'one')
      fill_in('cookieValue', with: 'one')
      click_button 'Add Cookie'

      expect(page).to have_content('one: one')

      # Reload the page
      page.evaluate_script('document.location.reload()')

      # Check again
      expect(page).to have_content('one: one')
    end
  end

  it 'should delete cookies' do
    visit '/'

    click_link 'Cookies'

    fill_in('cookieName', with: 'two')
    fill_in('cookieValue', with: 'two')
    click_button 'Add Cookie'

    expect(page).to have_content('two: two')

    find('.cookieDelete').click

    expect(page).to_not have_content('two: two')

    # Reload the page
    page.evaluate_script('document.location.reload()')

    expect(page).to_not have_content('two: two')
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

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