Commit Graph

18 Commits

Author SHA1 Message Date
Nicklas Ramhöj 792781f00b Prevent race conditions when checking negative assertions, closes #843 2012-10-30 11:08:44 +01:00
Jarl Friis 8117598927 Fixing issue with have_xpath and have_css when count is 0 2012-09-25 11:35:25 +02:00
Jonas Nicklas e39c026abe Change selector normalization to check for symbol
With this change, any call to `find`, `all`, etc where the first argument is a Symbol, will assume that that Symbol is the name of the selector. This makes the `match` option on the `id` selector impossible, so `find(:foo)` will no longer find elements by id.

This change is in preparation for allowing selectors without locators, as discussed in #783, which we will probably hold off with until Capybara 2.1, because it is too much work.

This commit ensures we won't have to break the API to make implementing #783 possible.
2012-09-09 17:32:03 +02:00
Jonas Nicklas 21fad63bc2 Raise error when invalid keys given 2012-07-13 15:36:43 +02:00
Jonas Nicklas and Nicklas Ramhöj 66b6aed8b2 Move failure message generatio to result class 2012-06-08 16:47:01 +02:00
Jonas Nicklas and Nicklas Ramhöj ad833a1e13 Selectors can no longer have custom failure messages 2012-06-08 15:53:25 +02:00
Jonas Nicklas 6afc49f76a Delegate even more error responsibility to query 2012-02-02 10:41:07 +01:00
Jonas Nicklas c7367c0511 Move error raise into query 2012-02-01 15:10:45 +01:00
Jonas Nicklas cc04222384 Send in node when initializing query 2012-02-01 13:24:14 +01:00
Jonas Nicklas 026e0b3406 Changes in xpath mean we can just #to_s this now! 2012-02-01 13:24:14 +01:00
Jonas Nicklas 1c6ea8ac3e Refactor 2012-02-01 13:24:14 +01:00
Jonas Nicklas 847191ab42 We're only ever finding a single xpath expression 2012-02-01 13:24:14 +01:00
Jonas Nicklas cc05b1d63b Raise an error when there are multiple elements found 2012-02-01 13:24:13 +01:00
Jonas Nicklas c48f0d54f0 Extract count matching into query 2012-02-01 13:24:13 +01:00
Jo Liss a3fae41d93 Make error messages about :text come out unescaped
I looked into 60ed5145 and discovered that Capybara::Query#initialize escapes
options[:text]. I think this is a bit confusing, and it messes up the error
message, so options[:text] is now escaped on the fly in matches_filters?.

Also add tests with blanks in them just to be on the safe side.
2012-01-04 00:35:53 +01:00
Jonas Nicklas 362fbffa8c Move negative failure message into query 2012-01-03 13:20:37 +01:00
Jonas Nicklas 18191c3223 Work on moving more failure message stuff to Query 2012-01-02 18:32:17 +01:00
Jonas Nicklas 4083ed1afa Make Query a first class citizen 2012-01-02 18:32:17 +01:00