releaf 1.1.17 → 1.1.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 47640a08dc408bca82388f428379d4b404472bd7
4
- data.tar.gz: 64e285971f9335d5e5884194c7654873d5196d83
2
+ SHA256:
3
+ metadata.gz: 938f663496bd4b0574171faa14063beb87e7c63c3eb4aee77f410db075ea59f6
4
+ data.tar.gz: efd703ad75992b890d1b6a35df6526a95714cc38d67cfb516a1fd55b1ac33375
5
5
  SHA512:
6
- metadata.gz: 09cea7b81c6005922738d4d8d693b15087e8c5c033f1d111b6f92281db8e3eaa0b6867749286cb2033e32271e4ae637f2c2b0e18d28ee589ef40f7f8ecfb8953
7
- data.tar.gz: 6458d397e8c9270c755ff2dff64373339c5c03b574acf58955bd81b5c0e0a2c0dea0f57d2022011144f0cc5d12fc48d5cf168d26275f27737fa655ca0baf5606
6
+ metadata.gz: dc58da9459f32a08e7e26ba8957b0d8280f3db530d0d50bda44723a916a06691d8dbb9095a392685a632a1ba9a930f572ad6e255fa4d33fe932c13382d8631b5
7
+ data.tar.gz: 14f74161e220ad8398da2e74684619825ba0e8bee0bed1a6244f85ba452c9623f883b48194aeae07191425779f4ce74bf670be526a63363d4b550438574d842a
@@ -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
- error_exists = false
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 find(:field, options[:field]) && first(".error", text: error_message)
45
- error_exists = true
46
- break
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
- error_exists = true
54
+ error_found = true
52
55
  end
53
56
  end
54
57
 
55
- raise Capybara::ElementNotFound.new("Unable to find given error message") unless error_exists
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
@@ -1,3 +1,3 @@
1
1
  module Releaf
2
- VERSION = "1.1.17"
2
+ VERSION = "1.1.22"
3
3
  end
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.17
4
+ version: 1.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - CubeSystems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-15 00:00:00.000000000 Z
11
+ date: 2020-05-26 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.17
19
+ version: 1.1.22
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.17
26
+ version: 1.1.22
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.17
33
+ version: 1.1.22
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.17
40
+ version: 1.1.22
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.17
47
+ version: 1.1.22
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.17
54
+ version: 1.1.22
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.17
61
+ version: 1.1.22
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.17
68
+ version: 1.1.22
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-rails
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: factory_girl_rails
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: 4.8.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: 4.8.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: syntax
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -238,16 +238,16 @@ dependencies:
238
238
  name: with_model
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - ">="
241
+ - - '='
242
242
  - !ruby/object:Gem::Version
243
- version: '0'
243
+ version: 1.2.2
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - ">="
248
+ - - '='
249
249
  - !ruby/object:Gem::Version
250
- version: '0'
250
+ version: 1.2.2
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: pry
253
253
  requirement: !ruby/object:Gem::Requirement
@@ -344,8 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
344
344
  - !ruby/object:Gem::Version
345
345
  version: '0'
346
346
  requirements: []
347
- rubyforge_project:
348
- rubygems_version: 2.6.14
347
+ rubygems_version: 3.0.4
349
348
  signing_key:
350
349
  specification_version: 4
351
350
  summary: Administration interface for Ruby on Rails