releaf 1.1.19 → 1.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/releaf/rspec/features_matchers.rb +16 -7
- data/lib/releaf/version.rb +1 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: eeeefdd3d3479208c2e862e1ac06617dc5a9bd8e
|
4
|
+
data.tar.gz: d557b989fded089d5a180e6216e62751377fc22e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f702e960bfefbef5d6deebb14b2a40d646f377582bbff039453966eac001b734dc31037db3ad3837227677a620775aa6dd5f6e93fd9309339d92be7fd816b080
|
7
|
+
data.tar.gz: d413347ab13e9041465a46e2b62d451073b7263e01ebec3e6c522b59412e8cde593703ed7cf10f74043762d79da58e9616a8c3a593c53faf6812dfc46741ce77
|
@@ -37,22 +37,31 @@ module Capybara
|
|
37
37
|
# e.g., the label text or the id of the textarea
|
38
38
|
# @return [true] whether errors has been found otherwise will raise Capybara::ElementNotFound exception
|
39
39
|
def has_error?(error_message, options = {})
|
40
|
-
|
40
|
+
error_found = false
|
41
41
|
if options[:field]
|
42
42
|
first('.field.has-error', minimum: 1) # wait for any errors to come from validation
|
43
|
-
all(".field.has-error").each do
|
44
|
-
if
|
45
|
-
|
46
|
-
|
43
|
+
all(".field.has-error").each do |field_container|
|
44
|
+
if !error_found
|
45
|
+
within(field_container) do
|
46
|
+
if has_field?(options[:field], wait: false) && has_css?(".error", text: error_message, wait: false)
|
47
|
+
error_found = true
|
48
|
+
end
|
49
|
+
end
|
47
50
|
end
|
48
51
|
end
|
49
52
|
else
|
50
53
|
if first(".form-error-box .error", text: error_message)
|
51
|
-
|
54
|
+
error_found = true
|
52
55
|
end
|
53
56
|
end
|
54
57
|
|
55
|
-
|
58
|
+
unless error_found
|
59
|
+
failure_text = "Unable to find error message #{error_message.inspect}"
|
60
|
+
if options[:field]
|
61
|
+
failure_text += " on field #{options[:field].inspect}"
|
62
|
+
end
|
63
|
+
raise Capybara::ElementNotFound.new failure_text
|
64
|
+
end
|
56
65
|
|
57
66
|
true
|
58
67
|
end
|
data/lib/releaf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: releaf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CubeSystems
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: releaf-core
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.1.
|
19
|
+
version: 1.1.20
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.1.
|
26
|
+
version: 1.1.20
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: releaf-i18n_database
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.1.
|
33
|
+
version: 1.1.20
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.1.
|
40
|
+
version: 1.1.20
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: releaf-permissions
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.1.
|
47
|
+
version: 1.1.20
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.1.
|
54
|
+
version: 1.1.20
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: releaf-content
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.1.
|
61
|
+
version: 1.1.20
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.1.
|
68
|
+
version: 1.1.20
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec-rails
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -345,26 +345,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
345
345
|
version: '0'
|
346
346
|
requirements: []
|
347
347
|
rubyforge_project:
|
348
|
-
rubygems_version: 2.
|
348
|
+
rubygems_version: 2.6.10
|
349
349
|
signing_key:
|
350
350
|
specification_version: 4
|
351
351
|
summary: Administration interface for Ruby on Rails
|
352
352
|
test_files:
|
353
|
-
- spec/factories/
|
354
|
-
- spec/factories/publisher.rb
|
355
|
-
- spec/factories/node.rb
|
353
|
+
- spec/factories/author.rb
|
356
354
|
- spec/factories/banner_page.rb
|
357
355
|
- spec/factories/book.rb
|
356
|
+
- spec/factories/chapter.rb
|
358
357
|
- spec/factories/common.rb
|
359
358
|
- spec/factories/home_page.rb
|
360
|
-
- spec/factories/
|
359
|
+
- spec/factories/node.rb
|
360
|
+
- spec/factories/node_route.rb
|
361
|
+
- spec/factories/publisher.rb
|
361
362
|
- spec/factories/role.rb
|
362
363
|
- spec/factories/text_page.rb
|
363
364
|
- spec/factories/user.rb
|
364
|
-
- spec/factories/chapter.rb
|
365
|
-
- spec/support/wait_steps.rb
|
366
365
|
- spec/support/controller_macros.rb
|
367
366
|
- spec/support/excel_helpers.rb
|
368
367
|
- spec/support/shared/service_includer.rb
|
369
|
-
- spec/
|
368
|
+
- spec/support/wait_steps.rb
|
370
369
|
- spec/rails_helper.rb
|
370
|
+
- spec/spec_helper.rb
|