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

15 commits

Author SHA1 Message Date
Thomas Walpole
1f56ec47b7 minor code cleanup inspired by RustyNail 2017-10-10 17:20:32 -07:00
Thomas Walpole
8f5f55af89 Fix Ruby warnings during tests 2017-05-31 17:52:11 -07:00
Thomas Walpole
0270b7a4cf Per-session config and thread specific current_driver/session_name 2017-04-27 13:37:04 -07:00
Thomas Walpole
92098f44b0 fix bad commit 2017-01-18 19:33:52 -08:00
Thomas Walpole
1a21567b9a ignore errors when trying to create detailed error message 2017-01-18 18:14:19 -08:00
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