1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
Commit graph

16 commits

Author SHA1 Message Date
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