Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: ExtractMethod/prickle
base: 5140b38219
...
head fork: ExtractMethod/prickle
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 6 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
View
2  .travis.yml
@@ -1,8 +1,8 @@
language: ruby
rvm:
+ - 2.0.0
- 1.9.2
- 1.9.3
- - rbx-19mode
before_script:
- sh -e /etc/init.d/xvfb start
View
2  README.md
@@ -24,6 +24,8 @@ World do
end
```
+*For Capybara 2.0, make sure you are using prickle ≥ 0.1.0*
+
## Waiting for elements to become visible
To enable this feature you need to set the *Prickle::Capybara.wait_time* property.
View
4 lib/prickle/capybara/element.rb
@@ -37,8 +37,8 @@ def find_element
end
def find_element_by_xpath
- wait_until(Capybara.wait_time) do
- find(:xpath, xpath).visible?
+ Timeout.timeout(Capybara.wait_time) do
+ sleep(0.1) until find(:xpath, xpath).visible?
end unless Capybara.wait_time.nil?
find :xpath, xpath
View
2  lib/prickle/version.rb
@@ -1,3 +1,3 @@
module Prickle
- VERSION = '0.0.6'
+ VERSION = '0.1.0'
end
View
2  prickle.gemspec
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
s.add_dependency "capybara"
s.add_development_dependency "capybara"
- s.add_development_dependency "rspec", "~> 2.8.0"
+ s.add_development_dependency "rspec", "~> 2.13.0"
s.add_development_dependency "sinatra", "~> 1.3.2"
s.add_development_dependency "rake"
s.add_development_dependency "capybara-webkit"
View
4 spec/extended_wait_spec.rb
@@ -22,7 +22,7 @@
it "can fail if an element doesn't appear after the default wait time" do
Prickle::Capybara.wait_time = 1
- expect { prickly.element(:name => 'never_appear').contains_text? "I lag" }.to raise_error Capybara::TimeoutError
+ expect { prickly.element(:name => 'never_appear').contains_text? "I lag" }.to raise_error TimeoutError
end
end
@@ -36,7 +36,7 @@
context "clicking elements" do
it 'fails to click an element that has not appeared yet' do
Prickle::Capybara.wait_time = 1
- expect { prickly.click_by_name('lagged') }.to raise_error Capybara::TimeoutError
+ expect { prickly.click_by_name('lagged') }.to raise_error TimeoutError
end
it 'can click an element after it appears' do

No commit comments for this range

Something went wrong with that request. Please try again.