1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/spec/session_without_javascript_support_spec.rb
Lenny Marks 8a0064cc1b Session#locate - return node identified by locator or raise ElementNotFound(using desc)
- Replaced usage of wait_for with locate.
- wait_until back to raising error instead of returning false (This is key)
- wait_for_condition removed

Capybara::Session with culerity driver#wait_until
- should wait for block to return true
- should raise Capybara::TimeoutError if block doesn't return true within timeout
- should accept custom timeout in seconds
- should default to Capybara.default_wait_time before timeout

Capybara::Session with culerity driver#locate
- should find the first element using the given locator
- should raise ElementNotFound with specified fail message if nothing was found
- should accept an XPath instance and respect the order of paths

Capybara::Session with culerity driver#locate within a scope
- should find the first element using the given locator

Capybara::Session with culerity driver#locate
- should wait for asynchronous load
2009-12-31 14:04:38 -05:00

15 lines
392 B
Ruby

require File.expand_path('spec_helper', File.dirname(__FILE__))
require 'nokogiri'
shared_examples_for "session without javascript support" do
describe "#evaluate_script" do
before{ @session.visit('/with_js') }
it "should raise an error" do
running {
@session.evaluate_script("1+5")
}.should raise_error(Capybara::NotSupportedByDriverError)
end
end
end