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

10 commits

Author SHA1 Message Date
Thomas Walpole
e85cce5778 Support easier full text matching 2016-12-23 12:28:25 -08:00
Thomas Walpole
5033eca9fc move helpers to BaseQuery 2016-08-31 12:04:22 -07:00
Thomas Walpole
b212d8fa2a Use Capybara::Helpers to_regexp and update history 2016-08-18 10:05:10 -07:00
Ryunosuke Sato
325876ce96 Allow to use text as invalid Regexp for #have_text
When the text as invalid Regexp is given to `#have_text`, it raises the following error:
``` ruby
expect(page).to have_text('[]') #=> RegexpError: empty char-class: /[]/
```

We expect an error `Capybara::ExpectationNotMet`, not a `RegexpError`.
2016-08-18 11:50:59 +09:00
Thomas Walpole
114ec10d12 improve error message when case doesn't match 2016-07-21 11:34:26 -07:00
Alex Chaffee
51c83ed5a9 Improve failure message when text is present but invisible.
When testing a page with JS that hides and shows
certain elements, it's useful to know whether a
test failure means that an element has failed to
render, or has rendered but become invisible (or
failed to become visible).

For instance, some jQuery plugins will take
existing elements and hide them, adding some other
elements onto the page that use the originals as
storage. If your tests are written to use the
now-hidden elements they will mysteriously start
failing.

This commit only changes the behavior for failed
tests (rspec and assert) and only for text
queries. It might be nice to extend this to the
other finders.
2016-07-21 11:29:35 -07:00
Thomas Walpole
07e7777425 frozen literal magic comment 2016-03-07 16:52:19 -08:00
Akira Matsuda
8f43c71e78 "warning: instance variable @type not initialized" 2015-07-21 17:26:34 +09:00
Thomas Walpole
bc47af003e raise error when invalid options are passed to have_text/have_content - Fixes issue #1549 2015-07-16 10:46:44 -07:00
Andrey Botalov
06c4955e56 Use diffferent queries for searching
* Add assert_text, assert_no_text, assert_title, assert_no_title
* Refactor query resolving
* Improve failure messages for have_text, have_title RSpec matchers (they will be the same as for added assert_* methods)
* Add Simple#inspect
2014-07-01 23:13:45 +03:00