dekiru 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +1 -1
- data/lib/dekiru/capybara/matchers.rb +10 -2
- data/lib/dekiru/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 118e02daae0f7eea68172f325ac8465830aa9d44eae089dd27244f0ed517b820
|
4
|
+
data.tar.gz: 13cf2c26e1bed62aad8dc32760e2b4ef071f19d55f080db3bdc2d2c7254927ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 047e7598645d7dc800b440a3ba85d67d45d1aa482927a8c944fe5cb929afc37d683081b2c2714359b5a16d3ef92abe3b0bb054cbaf37ebdeb77fcb8dba8a5217
|
7
|
+
data.tar.gz: 5c3c7f2a719bd56ca3c2c4cca1838739235f1d6113734c372193b83e1753811afd3df35abca57740a1afe530f6b8312650bce570b364bd051dc8a5b10de2e435
|
data/.github/workflows/rspec.yml
CHANGED
@@ -2,6 +2,10 @@ module Dekiru
|
|
2
2
|
module Capybara
|
3
3
|
module Matchers
|
4
4
|
class JsNoErrorMatcher
|
5
|
+
def initialize(example_description)
|
6
|
+
@example_description = example_description
|
7
|
+
end
|
8
|
+
|
5
9
|
def matches?(page_or_logs)
|
6
10
|
logs = if page_or_logs.respond_to?(:driver)
|
7
11
|
page_or_logs.driver.browser.logs.get(:browser)
|
@@ -9,7 +13,7 @@ module Dekiru
|
|
9
13
|
page_or_logs
|
10
14
|
end
|
11
15
|
logs.find_all { |log| log.level == 'WARNING' }.each do |log|
|
12
|
-
STDERR.puts
|
16
|
+
STDERR.puts "WARN: javascript warning in #{@example_description}"
|
13
17
|
STDERR.puts log.message
|
14
18
|
end
|
15
19
|
|
@@ -27,7 +31,11 @@ module Dekiru
|
|
27
31
|
end
|
28
32
|
|
29
33
|
def have_no_js_errors
|
30
|
-
|
34
|
+
# NOTE: Extract "\"displays tooltip\" (./spec/system/my_awesome_spec.rb:101)"
|
35
|
+
# From "#<RSpec::ExampleGroups::Nested::Nested_4::Nested_4 \"displays tooltip\" (./spec/system/my_awesome_spec.rb:101)>"
|
36
|
+
example_description = self.inspect.split(' ', 2).last.chop
|
37
|
+
|
38
|
+
JsNoErrorMatcher.new(example_description)
|
31
39
|
end
|
32
40
|
end
|
33
41
|
end
|
data/lib/dekiru/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dekiru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akihiro Matsumura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|