Commit Graph

17 Commits

Author SHA1 Message Date
Thomas Walpole 928eb6d8e3 Remove extraneous quotes and fix test 2017-11-09 08:10:04 -08:00
Oliver Peate 2e869bb9b7 Allow JavaScript errors to be raised as exceptions (#988)
When configured, all driver commands (except reading console messages) will
check for JavaScript errors. 

The ConsoleMessages command is excluded from the check to prevent recursion, and
maintain the ease of debugging JavaScript errors interactively.
2017-03-17 14:54:36 +00:00
Thomas Walpole ed295f25bd Update to modern RSpec 2017-02-06 10:56:58 -08:00
Joe Ferris 753348ecb4 Extract class for booting the server
The Connection class is fairly large and combines the responsibilities
of booting the server and connecting to it.

This extracts a class to encapsulate booting a server. It also provides
a hook for injecting your own server.
2016-04-07 13:10:20 -04:00
Joe Ferris 15fe888069 Move stderr option to config
This is another option we missed when moving things into the
Configuration object.

I had to make substantial changes to the tests, because many of them
were using the stderr option for new connections. However, I think the
end result is actually cleaner.
2016-04-07 12:07:03 -04:00
Joe Ferris 519d90306b Introduce API for global configuration
Users were generally confused about where to configure things like
allowed URLs. Because they were reset in between each sessions, they
needed to be applied repeatedly in a before block.

This introduces an API for global configuration, which will be applied
for every session. It also deprecates the per-session configuration
methods, as those are less likely to be useful.
2015-06-26 13:13:23 -04:00
Joe Ferris 79088c2282 Fix reset crash when replies are destroyed
We attempted to track in-progress replies and abort them in 1.5.1.
However, sometimes these replies are destroyed unexpectedly, so
attempting to abort them raises errors.

This commit tracks when replies are destroyed and removes them from the
queue of in-progress replies.
2015-06-05 13:29:26 -04:00
Joe Ferris 3804dd5406 Introduce allowed, blocked URL filters
* Adds `allow_url`, `block_url`, and `block_unknown_url` methods.
* Both allow_url and block_url accept wildcards.
* Any requests to blocked URLs will be blocked immediately.
* Blocked URLs take precedence over allowed URLs.
* By default, any requests to localhost and 127.0.0.1 are allowed.
* By default, any requests to unknown hosts will print a warning.
* `block_unknown_urls` causes unknown hosts to be silently blocked.
* `blacklisted_urls=` is deprecated in favor of `block_url`.
2014-12-05 12:48:03 -05:00
Alex Kwiatkowski 5dd835e4ca This fixes a stderr redirection test on fast machines. The write pipe was
getting closed before the redirection thread had a chance to copy it's
contents into it.
2014-02-13 18:36:03 -05:00
Joe Ferris and Matt Horan 0f89db1825 Add integration coverage for styled file inputs
Uses example from Quirksmode:
http://www.quirksmode.org/dom/inputfile.html
2013-11-09 15:29:51 -05:00
Matthew Horan 8650fe1ff3 Don't reset the browser unnecessarily
The Capybara spec_helper already resets the browser after each spec, so
we only need to reset after using the driver via AppRunner.
2012-11-30 22:12:03 -05:00
Matthew Horan 61a6561d62 Session is responsible for starting server 2012-11-30 21:38:55 -05:00
Joe Ferris ba28a2a20a Fix focus/blur event compatibility with Selenium while filling out forms 2012-07-10 20:05:33 -07:00
Joe Ferris 327ae85e86 Use sinatra for test apps 2012-07-08 16:09:40 -07:00
Joe Ferris 265a7da652 Improve pattern of testing driver against a rack app 2012-07-08 13:38:19 -07:00
Gabe Berke-Williams 01665e604f Expose the socket debugger 2011-07-22 14:24:30 -04:00
Joe Ferris e28cc06cab Fixed multiple browsers starting because before(:all) runs multiple times; fixed separate app servers starting for each example; added injectable class for debugging wire protocol 2011-03-11 11:19:59 -05:00