Sha256: 3d7ac40c25b7c05be74d13a0b2ae6930b5d543f34b39aba5e74118affe672240

Contents?: true

Size: 1.19 KB

Versions: 31

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true
Capybara::SpecHelper.spec '#html' do
  it "should return the unmodified page body" do
    @session.visit('/')
    expect(@session.html).to include('Hello world!')
  end

  it "should return the current state of the page", requires: [:js] do
    @session.visit('/with_js')
    expect(@session.html).to include('I changed it')
    expect(@session.html).not_to include('This is text')
  end
end

Capybara::SpecHelper.spec '#source' do
  it "should return the unmodified page source" do
    @session.visit('/')
    expect(@session.source).to include('Hello world!')
  end

  it "should return the current state of the page", requires: [:js] do
    @session.visit('/with_js')
    expect(@session.source).to include('I changed it')
    expect(@session.source).not_to include('This is text')
  end
end

Capybara::SpecHelper.spec '#body' do
  it "should return the unmodified page source" do
    @session.visit('/')
    expect(@session.body).to include('Hello world!')
  end

  it "should return the current state of the page", requires: [:js] do
    @session.visit('/with_js')
    expect(@session.body).to include('I changed it')
    expect(@session.body).not_to include('This is text')
  end
end

Version data entries

31 entries across 27 versions & 3 rubygems

Version Path
tdiary-5.0.8 vendor/bundle/gems/capybara-2.18.0/lib/capybara/spec/session/html_spec.rb
tdiary-5.0.8 vendor/bundle/ruby/2.5.0/gems/capybara-2.18.0/lib/capybara/spec/session/html_spec.rb
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/capybara-2.16.1/lib/capybara/spec/session/html_spec.rb
capybara-2.18.0 lib/capybara/spec/session/html_spec.rb
capybara-2.17.0 lib/capybara/spec/session/html_spec.rb
tdiary-5.0.7 vendor/bundle/gems/capybara-2.16.1/lib/capybara/spec/session/html_spec.rb
capybara-2.16.1 lib/capybara/spec/session/html_spec.rb
capybara-2.16.0 lib/capybara/spec/session/html_spec.rb
capybara-2.15.4 lib/capybara/spec/session/html_spec.rb
capybara-2.15.3 lib/capybara/spec/session/html_spec.rb
capybara-2.15.2 lib/capybara/spec/session/html_spec.rb
tdiary-5.0.6 vendor/bundle/gems/capybara-2.15.1/lib/capybara/spec/session/html_spec.rb
capybara-2.15.1 lib/capybara/spec/session/html_spec.rb
capybara-2.15.0 lib/capybara/spec/session/html_spec.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/capybara-2.13.0/lib/capybara/spec/session/html_spec.rb
tdiary-5.0.5 vendor/bundle/gems/capybara-2.13.0/lib/capybara/spec/session/html_spec.rb
tdiary-5.0.5 vendor/bundle/gems/capybara-2.14.3/lib/capybara/spec/session/html_spec.rb
capybara-2.14.4 lib/capybara/spec/session/html_spec.rb
capybara-2.14.3 lib/capybara/spec/session/html_spec.rb
capybara-2.14.2 lib/capybara/spec/session/html_spec.rb