Sha256: cce3e993f1ec3ad454ccda89da3f85b95c07952ef3d06b769c0ee17b68a4885f

Contents?: true

Size: 1.19 KB

Versions: 13

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

13 entries across 13 versions & 2 rubygems

Version Path
tdiary-5.0.9 vendor/bundle/gems/capybara-3.2.1/lib/capybara/spec/session/html_spec.rb
capybara-3.3.1 lib/capybara/spec/session/html_spec.rb
capybara-3.3.0 lib/capybara/spec/session/html_spec.rb
capybara-3.2.1 lib/capybara/spec/session/html_spec.rb
capybara-3.2.0 lib/capybara/spec/session/html_spec.rb
capybara-3.1.1 lib/capybara/spec/session/html_spec.rb
capybara-3.1.0 lib/capybara/spec/session/html_spec.rb
capybara-3.0.3 lib/capybara/spec/session/html_spec.rb
capybara-3.0.2 lib/capybara/spec/session/html_spec.rb
capybara-3.0.1 lib/capybara/spec/session/html_spec.rb
capybara-3.0.0 lib/capybara/spec/session/html_spec.rb
capybara-3.0.0.rc2 lib/capybara/spec/session/html_spec.rb
capybara-3.0.0.rc1 lib/capybara/spec/session/html_spec.rb