mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
cleanup
This commit is contained in:
parent
4d890ed9d2
commit
6610211b24
4 changed files with 4 additions and 6 deletions
|
@ -68,7 +68,7 @@ class Capybara::Driver::Base
|
|||
end
|
||||
|
||||
def frame_title
|
||||
title = find_xpath('/html/head/title').map(&:all_text).first.to_s
|
||||
find_xpath('/html/head/title').map(&:all_text).first.to_s
|
||||
end
|
||||
|
||||
def frame_url
|
||||
|
|
|
@ -133,14 +133,14 @@ Capybara::SpecHelper.spec "#attach_file" do
|
|||
expect do
|
||||
@session.attach_file("hidden_file",
|
||||
with_os_path_separators(__FILE__),
|
||||
make_visible: {opacity: 1, display: 'block'})
|
||||
make_visible: { opacity: 1, display: 'block' })
|
||||
end.not_to raise_error
|
||||
end
|
||||
|
||||
it "raises an error when the file input is not made visible" do
|
||||
@session.visit('/with_js')
|
||||
expect do
|
||||
@session.attach_file("hidden_file", with_os_path_separators(__FILE__), make_visible: {color: 'red'})
|
||||
@session.attach_file("hidden_file", with_os_path_separators(__FILE__), make_visible: { color: 'red' })
|
||||
end.to raise_error(Capybara::ExpectationNotMet)
|
||||
end
|
||||
|
||||
|
@ -151,7 +151,6 @@ Capybara::SpecHelper.spec "#attach_file" do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def with_os_path_separators(path)
|
||||
|
|
|
@ -115,5 +115,4 @@ Capybara::SpecHelper.spec '#current_url, #current_path, #current_host' do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -35,7 +35,7 @@ RSpec.describe Capybara::Server do
|
|||
ensure
|
||||
Capybara.server_host = nil
|
||||
end
|
||||
end unless (ENV['TRAVIS'] && (RUBY_ENGINE == 'jruby') or Gem.win_platform?)
|
||||
end unless ENV['TRAVIS'] && (RUBY_ENGINE == 'jruby') or Gem.win_platform?
|
||||
|
||||
it "should use specified port" do
|
||||
Capybara.server_port = 22789
|
||||
|
|
Loading…
Reference in a new issue