capybara_error_intel 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -0
- data/README.md +8 -3
- data/Rakefile +2 -0
- data/bin/console +2 -0
- data/lib/capybara_error_intel.rb +2 -0
- data/lib/capybara_error_intel/dsl.rb +13 -3
- data/lib/capybara_error_intel/version.rb +3 -1
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9acc4da6a1c2fd22a603bdc16a80956ae92df1a0b7e38f1518fc6f79a913b3fc
|
|
4
|
+
data.tar.gz: 4635c229c82d48c47f7018dc7f7efc60da5cc452276068537eeedbddf1643690
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ce00c1d62424f3a98ab34b7ae03e4bd2e5ed9ddf2302425a49ad421e2f13e476136225d67cf4a69a2b4be26b03f87658159c7b66b9064174111b0fa1e932643
|
|
7
|
+
data.tar.gz: 3881fc23deba4ec0da2e9306b00d3ec14c2d3dc54f7c14622827d1bf34998311003fff05d23afa0d01fbe02a5ef8f474ca9c58931d26bfe451bff68907c2d6c6
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
[](https://travis-ci.org/dkarter/capybara_error_intel) [](https://travis-ci.org/dkarter/capybara_error_intel) [](https://codeclimate.com/github/dkarter/capybara_error_intel) [](https://codeclimate.com/github/dkarter/capybara_error_intel/coverage) [](https://codeclimate.com/github/dkarter/capybara_error_intel) [](https://badge.fury.io/rb/capybara_error_intel) 
|
|
4
4
|
|
|
5
5
|
Capybara provides excellent error messages for its built in predicate methods: `has_selector?`, `has_text?`, `has_title?` etc., but when those are used from Page Objects while exposing predicate methods from the PageObjects themselves the error messages are lost and all we get is `expected true, got false`. Including this module into your PageObject by adding `include CapybaraErrorIntel::DSL` after `include Capybara::DSL` will return the heuristic error messages.
|
|
6
6
|
|
|
@@ -118,6 +118,13 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
|
118
118
|
|
|
119
119
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
120
120
|
|
|
121
|
+
## Releasing a New Version
|
|
122
|
+
0. Add a version header to the top of CHANGELOG.md and list all changes as
|
|
123
|
+
bullets below the new version number
|
|
124
|
+
1. Change the version number in `lib/capybara_error_intel/version.rb`
|
|
125
|
+
2. In the project's directory run `gem build capybara_error_intel.gemspec`
|
|
126
|
+
3. Push the gem to RubyGems `gem push capybara_error_intel-##VERSION##.gem`
|
|
127
|
+
|
|
121
128
|
## Contributing
|
|
122
129
|
|
|
123
130
|
Bug reports and pull requests are welcome on GitHub at
|
|
@@ -126,8 +133,6 @@ https://github.com/dkarter/capybara_error_intel
|
|
|
126
133
|
Please make sure the test suite passes and that you added tests for any new
|
|
127
134
|
method implemented.
|
|
128
135
|
|
|
129
|
-
|
|
130
|
-
|
|
131
136
|
## License
|
|
132
137
|
|
|
133
138
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/lib/capybara_error_intel.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module CapybaraErrorIntel
|
|
2
4
|
# Wraps Capybara::DSL
|
|
3
5
|
module DSL
|
|
@@ -52,15 +54,23 @@ module CapybaraErrorIntel
|
|
|
52
54
|
private
|
|
53
55
|
|
|
54
56
|
def has_selector(*args)
|
|
55
|
-
|
|
57
|
+
capybara_matcher_module::HaveSelector.new(*args)
|
|
56
58
|
end
|
|
57
59
|
|
|
58
60
|
def has_text(*args)
|
|
59
|
-
|
|
61
|
+
capybara_matcher_module::HaveText.new(*args)
|
|
60
62
|
end
|
|
61
63
|
|
|
62
64
|
def has_title(title, options)
|
|
63
|
-
|
|
65
|
+
capybara_matcher_module::HaveTitle.new(title, options)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def capybara_matcher_module
|
|
69
|
+
if Capybara::VERSION.to_f >= 3.14
|
|
70
|
+
Capybara::RSpecMatchers::Matchers
|
|
71
|
+
else
|
|
72
|
+
Capybara::RSpecMatchers
|
|
73
|
+
end
|
|
64
74
|
end
|
|
65
75
|
|
|
66
76
|
def match_or_error(matcher)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capybara_error_intel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dorian Karter
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -291,8 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
291
291
|
- !ruby/object:Gem::Version
|
|
292
292
|
version: '0'
|
|
293
293
|
requirements: []
|
|
294
|
-
|
|
295
|
-
rubygems_version: 2.7.3
|
|
294
|
+
rubygems_version: 3.0.3
|
|
296
295
|
signing_key:
|
|
297
296
|
specification_version: 4
|
|
298
297
|
summary: Provides Capybara's heuristic error messages for Page Objects
|