spreewald 4.5.0 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.ruby266 +2 -0
- data/Gemfile.ruby266.lock +35 -1
- data/Gemfile.ruby320 +2 -0
- data/Gemfile.ruby320.lock +32 -0
- data/lib/spreewald/web_steps.rb +4 -2
- data/lib/spreewald_support/capybara_wrapper.rb +19 -0
- data/lib/spreewald_support/field_errors.rb +33 -10
- data/lib/spreewald_support/tolerance_for_selenium_sync_issues.rb +3 -19
- data/lib/spreewald_support/version.rb +1 -1
- data/lib/spreewald_support/without_waiting.rb +13 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/spreewald_support/tolerance_for_selenium_sync_issues_spec.rb +0 -8
- data/spec/spreewald_support/without_waiting_spec.rb +41 -0
- data/spreewald.gemspec +2 -9
- data/tests/rails-7_capybara-3/Gemfile.lock +3 -1
- data/tests/shared/app/views/forms/invalid_rails_form.html.haml +4 -0
- data/tests/shared/features/shared/web_steps.feature +23 -21
- metadata +9 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b39835ad05fbf5b2f8f480e2f4bafd13fd07f2c822228adff6445a81ac36df13
|
4
|
+
data.tar.gz: 4844370f32c120881c762570794714a6f76c1ceb6a80fe2a97ecf676fa8f3a53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fc1c4a1a20b56e5e66d939c8e4872777bb4fd0c60fae7299c15cbf7526d47a60f3f5596ac31871d85bb30e04f6df552bb29e156295bf560d31af122f89226f0
|
7
|
+
data.tar.gz: 87de9fc0e2276d54dbbba13417ff264e4265ad840b3dda35b5c2b78b820d4952f5e77fc689a4f166d087c6efc43ba4368729b47dd1e5944a99d2ae2938280dd9
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
5
5
|
|
6
|
+
## 4.6.0
|
7
|
+
- Spreewald now explicitly depends on Capybara. We don't expect anyone used it without Capybara in the first place.
|
8
|
+
- Changes to "the ... field should (not) have (an error|the error ...)" step:
|
9
|
+
- fixed an edgecases where errors were nested deeper inside a .field_with_errors element
|
10
|
+
- significant speed-up in most situations
|
11
|
+
|
12
|
+
## 4.5.1
|
13
|
+
- Make `I should see an element for` and `I click on the element for` compatible for Ruby 3.0. ([#204](https://github.com/makandra/spreewald/issues/204))
|
14
|
+
|
6
15
|
## 4.5.0
|
7
16
|
- `patiently` retries one more time in certain edge cases where the alloted time was used up within the last retry of the `patiently` block (usually by Capybara).
|
8
17
|
|
data/Gemfile.ruby266
CHANGED
data/Gemfile.ruby266.lock
CHANGED
@@ -1,6 +1,18 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
spreewald (4.6.0)
|
5
|
+
capybara
|
6
|
+
cucumber
|
7
|
+
cucumber_priority (>= 0.3.0)
|
8
|
+
rspec (>= 2.13.0)
|
9
|
+
xpath
|
10
|
+
|
1
11
|
GEM
|
2
12
|
remote: https://rubygems.org/
|
3
13
|
specs:
|
14
|
+
addressable (2.8.5)
|
15
|
+
public_suffix (>= 2.0.2, < 6.0)
|
4
16
|
aruba (2.0.0)
|
5
17
|
bundler (>= 1.17, < 3.0)
|
6
18
|
childprocess (>= 2.0, < 5.0)
|
@@ -9,6 +21,15 @@ GEM
|
|
9
21
|
rspec-expectations (~> 3.4)
|
10
22
|
thor (~> 1.0)
|
11
23
|
builder (3.2.4)
|
24
|
+
capybara (3.36.0)
|
25
|
+
addressable
|
26
|
+
matrix
|
27
|
+
mini_mime (>= 0.1.3)
|
28
|
+
nokogiri (~> 1.8)
|
29
|
+
rack (>= 1.6.0)
|
30
|
+
rack-test (>= 0.6.3)
|
31
|
+
regexp_parser (>= 1.5, < 3.0)
|
32
|
+
xpath (~> 3.2)
|
12
33
|
childprocess (4.0.0)
|
13
34
|
contracts (0.16.0)
|
14
35
|
cucumber (7.1.0)
|
@@ -42,20 +63,30 @@ GEM
|
|
42
63
|
cucumber-core (~> 10.1, >= 10.1.0)
|
43
64
|
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
|
44
65
|
cucumber-messages (~> 17.1, >= 17.1.1)
|
66
|
+
cucumber_priority (0.3.3)
|
67
|
+
cucumber
|
45
68
|
diff-lcs (1.4.4)
|
46
69
|
ffi (1.15.4)
|
47
70
|
gemika (0.8.1)
|
48
71
|
mail (2.7.1)
|
49
72
|
mini_mime (>= 0.1.1)
|
73
|
+
matrix (0.4.2)
|
50
74
|
mime-types (3.4.1)
|
51
75
|
mime-types-data (~> 3.2015)
|
52
76
|
mime-types-data (3.2021.1115)
|
53
77
|
mini_mime (1.1.2)
|
78
|
+
mini_portile2 (2.5.3)
|
54
79
|
multi_test (0.1.2)
|
55
|
-
nokogiri (1.11.1
|
80
|
+
nokogiri (1.11.1)
|
81
|
+
mini_portile2 (~> 2.5.0)
|
56
82
|
racc (~> 1.4)
|
83
|
+
public_suffix (5.0.4)
|
57
84
|
racc (1.5.2)
|
85
|
+
rack (3.0.8)
|
86
|
+
rack-test (2.1.0)
|
87
|
+
rack (>= 1.3)
|
58
88
|
rake (13.0.3)
|
89
|
+
regexp_parser (2.8.3)
|
59
90
|
rspec (3.10.0)
|
60
91
|
rspec-core (~> 3.10.0)
|
61
92
|
rspec-expectations (~> 3.10.0)
|
@@ -72,6 +103,8 @@ GEM
|
|
72
103
|
sys-uname (1.2.2)
|
73
104
|
ffi (~> 1.1)
|
74
105
|
thor (1.1.0)
|
106
|
+
xpath (3.2.0)
|
107
|
+
nokogiri (~> 1.8)
|
75
108
|
|
76
109
|
PLATFORMS
|
77
110
|
ruby
|
@@ -84,6 +117,7 @@ DEPENDENCIES
|
|
84
117
|
nokogiri
|
85
118
|
rake
|
86
119
|
rspec
|
120
|
+
spreewald!
|
87
121
|
|
88
122
|
RUBY VERSION
|
89
123
|
ruby 2.6.6p146
|
data/Gemfile.ruby320
CHANGED
data/Gemfile.ruby320.lock
CHANGED
@@ -1,6 +1,18 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
spreewald (4.6.0)
|
5
|
+
capybara
|
6
|
+
cucumber
|
7
|
+
cucumber_priority (>= 0.3.0)
|
8
|
+
rspec (>= 2.13.0)
|
9
|
+
xpath
|
10
|
+
|
1
11
|
GEM
|
2
12
|
remote: https://rubygems.org/
|
3
13
|
specs:
|
14
|
+
addressable (2.8.5)
|
15
|
+
public_suffix (>= 2.0.2, < 6.0)
|
4
16
|
aruba (2.0.0)
|
5
17
|
bundler (>= 1.17, < 3.0)
|
6
18
|
childprocess (>= 2.0, < 5.0)
|
@@ -9,6 +21,15 @@ GEM
|
|
9
21
|
rspec-expectations (~> 3.4)
|
10
22
|
thor (~> 1.0)
|
11
23
|
builder (3.2.4)
|
24
|
+
capybara (3.39.2)
|
25
|
+
addressable
|
26
|
+
matrix
|
27
|
+
mini_mime (>= 0.1.3)
|
28
|
+
nokogiri (~> 1.8)
|
29
|
+
rack (>= 1.6.0)
|
30
|
+
rack-test (>= 0.6.3)
|
31
|
+
regexp_parser (>= 1.5, < 3.0)
|
32
|
+
xpath (~> 3.2)
|
12
33
|
childprocess (4.0.0)
|
13
34
|
contracts (0.16.0)
|
14
35
|
cucumber (7.1.0)
|
@@ -42,6 +63,8 @@ GEM
|
|
42
63
|
cucumber-core (~> 10.1, >= 10.1.0)
|
43
64
|
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
|
44
65
|
cucumber-messages (~> 17.1, >= 17.1.1)
|
66
|
+
cucumber_priority (0.3.3)
|
67
|
+
cucumber
|
45
68
|
date (3.3.3)
|
46
69
|
diff-lcs (1.4.4)
|
47
70
|
ffi (1.15.4)
|
@@ -51,6 +74,7 @@ GEM
|
|
51
74
|
net-imap
|
52
75
|
net-pop
|
53
76
|
net-smtp
|
77
|
+
matrix (0.4.2)
|
54
78
|
mime-types (3.4.1)
|
55
79
|
mime-types-data (~> 3.2015)
|
56
80
|
mime-types-data (3.2021.1115)
|
@@ -67,8 +91,13 @@ GEM
|
|
67
91
|
net-protocol
|
68
92
|
nokogiri (1.14.1-x86_64-linux)
|
69
93
|
racc (~> 1.4)
|
94
|
+
public_suffix (5.0.4)
|
70
95
|
racc (1.5.2)
|
96
|
+
rack (3.0.8)
|
97
|
+
rack-test (2.1.0)
|
98
|
+
rack (>= 1.3)
|
71
99
|
rake (13.0.3)
|
100
|
+
regexp_parser (2.8.3)
|
72
101
|
rspec (3.10.0)
|
73
102
|
rspec-core (~> 3.10.0)
|
74
103
|
rspec-expectations (~> 3.10.0)
|
@@ -86,6 +115,8 @@ GEM
|
|
86
115
|
ffi (~> 1.1)
|
87
116
|
thor (1.1.0)
|
88
117
|
timeout (0.3.1)
|
118
|
+
xpath (3.2.0)
|
119
|
+
nokogiri (~> 1.8)
|
89
120
|
|
90
121
|
PLATFORMS
|
91
122
|
x86_64-linux
|
@@ -98,6 +129,7 @@ DEPENDENCIES
|
|
98
129
|
nokogiri
|
99
130
|
rake
|
100
131
|
rspec
|
132
|
+
spreewald!
|
101
133
|
|
102
134
|
RUBY VERSION
|
103
135
|
ruby 3.2.0p0
|
data/lib/spreewald/web_steps.rb
CHANGED
@@ -279,7 +279,8 @@ Then /^I should( not)? see (?:an|the) element for (.*?)$/ do |negate, locator|
|
|
279
279
|
expectation = negate ? :not_to : :to
|
280
280
|
selector = _selector_for(locator)
|
281
281
|
patiently do
|
282
|
-
|
282
|
+
args, kwargs = deconstruct_selector(selector)
|
283
|
+
expect(page).send(expectation, have_selector(*args, **kwargs))
|
283
284
|
end
|
284
285
|
end.overridable(:priority => -5) # priority must be lower than the "within" step
|
285
286
|
|
@@ -578,7 +579,8 @@ end.overridable
|
|
578
579
|
When /^I click on the element for (.+?)$/ do |locator|
|
579
580
|
patiently do
|
580
581
|
selector = _selector_for(locator)
|
581
|
-
|
582
|
+
args, kwargs = deconstruct_selector(selector)
|
583
|
+
page.find(*args, **kwargs).click
|
582
584
|
end
|
583
585
|
end.overridable(priority: -5) # priority lower than within
|
584
586
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Spreewald
|
2
|
+
class CapybaraWrapper
|
3
|
+
def self.default_max_wait_time
|
4
|
+
if Capybara.respond_to?(:default_max_wait_time)
|
5
|
+
Capybara.default_max_wait_time
|
6
|
+
else
|
7
|
+
Capybara.default_wait_time
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.default_max_wait_time=(value)
|
12
|
+
if Capybara.respond_to?(:default_max_wait_time=)
|
13
|
+
Capybara.default_max_wait_time = value
|
14
|
+
else
|
15
|
+
Capybara.default_wait_time = value
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spreewald_support/driver_info'
|
2
|
+
require 'spreewald_support/without_waiting'
|
2
3
|
|
3
4
|
module Spreewald
|
4
5
|
def self.field_error_class
|
@@ -21,6 +22,7 @@ module Spreewald
|
|
21
22
|
|
22
23
|
class FieldErrorFinder
|
23
24
|
include Spreewald::DriverInfo
|
25
|
+
include WithoutWaiting
|
24
26
|
|
25
27
|
def initialize(page, element)
|
26
28
|
@page = page
|
@@ -28,29 +30,50 @@ module Spreewald
|
|
28
30
|
end
|
29
31
|
|
30
32
|
def error_present?
|
31
|
-
|
33
|
+
without_waiting do
|
34
|
+
custom_error? || bootstrap3_error? || bootstrap45_error? || rails_error?
|
35
|
+
end
|
32
36
|
end
|
33
37
|
|
34
38
|
def custom_error?
|
35
|
-
|
39
|
+
return false unless Spreewald.field_error_class
|
40
|
+
|
41
|
+
has_xpath? do |x|
|
42
|
+
x.ancestor_or_self(:div)[x.attr(:class).contains_word(Spreewald.field_error_class)]
|
43
|
+
end
|
36
44
|
end
|
37
45
|
|
38
46
|
def bootstrap3_error?
|
39
|
-
|
47
|
+
has_xpath? do |x|
|
48
|
+
x.ancestor(:div)[x.attr(:class).contains_word('form-group')][x.attr(:class).contains_word('has-error')]
|
49
|
+
end
|
40
50
|
end
|
41
51
|
|
42
52
|
def bootstrap45_error?
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
53
|
+
without_waiting do
|
54
|
+
element_classes = @element[:class]&.split(' ') || []
|
55
|
+
invalid_elements = if javascript_capable?
|
56
|
+
@page.all(':invalid') # Collect all invalid elements as Bootstrap 4 and 5 support client validation
|
57
|
+
end
|
47
58
|
|
48
|
-
|
59
|
+
element_classes.include?('is-invalid') || (invalid_elements && invalid_elements.include?(@element))
|
60
|
+
end
|
49
61
|
end
|
50
62
|
|
51
63
|
def rails_error?
|
52
|
-
|
53
|
-
|
64
|
+
has_xpath? do |x|
|
65
|
+
x.ancestor(:div)[x.attr(:class).contains_word('field_with_errors')]
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
private
|
70
|
+
|
71
|
+
def has_xpath?(&block)
|
72
|
+
xpath = XPath.generate(&block)
|
73
|
+
without_waiting do
|
74
|
+
@element.has_xpath?(xpath)
|
75
|
+
end
|
54
76
|
end
|
77
|
+
|
55
78
|
end
|
56
79
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'spreewald_support/capybara_wrapper'
|
2
|
+
|
1
3
|
module ToleranceForSeleniumSyncIssues
|
2
4
|
RETRY_ERRORS = %w[
|
3
5
|
ActionController::UrlGenerationError
|
@@ -17,24 +19,6 @@ module ToleranceForSeleniumSyncIssues
|
|
17
19
|
Selenium::WebDriver::Error::NoSuchAlertError
|
18
20
|
]
|
19
21
|
|
20
|
-
class CapybaraWrapper
|
21
|
-
def self.default_max_wait_time
|
22
|
-
if Capybara.respond_to?(:default_max_wait_time)
|
23
|
-
Capybara.default_max_wait_time
|
24
|
-
else
|
25
|
-
Capybara.default_wait_time
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def self.default_max_wait_time=(value)
|
30
|
-
if Capybara.respond_to?(:default_max_wait_time=)
|
31
|
-
Capybara.default_max_wait_time = value
|
32
|
-
else
|
33
|
-
Capybara.default_wait_time = value
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
22
|
class Patiently
|
39
23
|
WAIT_PERIOD = 0.05
|
40
24
|
|
@@ -68,7 +52,7 @@ module ToleranceForSeleniumSyncIssues
|
|
68
52
|
end
|
69
53
|
|
70
54
|
|
71
|
-
def patiently(seconds = CapybaraWrapper.default_max_wait_time, &block)
|
55
|
+
def patiently(seconds = Spreewald::CapybaraWrapper.default_max_wait_time, &block)
|
72
56
|
if page.driver.wait?
|
73
57
|
Patiently.new.patiently(seconds, &block)
|
74
58
|
else
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spreewald_support/capybara_wrapper'
|
2
|
+
|
3
|
+
module Spreewald
|
4
|
+
module WithoutWaiting
|
5
|
+
def without_waiting
|
6
|
+
prior_max_wait_time = CapybaraWrapper.default_max_wait_time
|
7
|
+
CapybaraWrapper.default_max_wait_time = 0
|
8
|
+
yield
|
9
|
+
ensure
|
10
|
+
CapybaraWrapper.default_max_wait_time = prior_max_wait_time
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,13 +1,5 @@
|
|
1
1
|
require 'spreewald_support/tolerance_for_selenium_sync_issues'
|
2
2
|
|
3
|
-
module Capybara
|
4
|
-
class ElementNotFound < StandardError; end
|
5
|
-
|
6
|
-
class << self
|
7
|
-
attr_accessor :default_max_wait_time
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
3
|
describe ToleranceForSeleniumSyncIssues do
|
12
4
|
subject { World.new }
|
13
5
|
let(:wait_time) { 0.2 }
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spreewald_support/without_waiting'
|
2
|
+
|
3
|
+
describe Spreewald::WithoutWaiting do
|
4
|
+
|
5
|
+
subject do
|
6
|
+
Class.new do
|
7
|
+
include Spreewald::WithoutWaiting
|
8
|
+
end.new
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '#without_waiting' do
|
12
|
+
it 'calls the block while setting the Capybara wait time to 0' do
|
13
|
+
wait_time_in_block = nil
|
14
|
+
subject.without_waiting do
|
15
|
+
wait_time_in_block = Capybara.default_max_wait_time
|
16
|
+
end
|
17
|
+
expect(wait_time_in_block).to eq(0)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'resets the prior wait time' do
|
21
|
+
prior = Capybara.default_max_wait_time
|
22
|
+
Capybara.default_max_wait_time = 4
|
23
|
+
subject.without_waiting {}
|
24
|
+
expect(Capybara.default_max_wait_time).to eq(4)
|
25
|
+
Capybara.default_max_wait_time = prior
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'resets the prior wait time on exceptions' do
|
29
|
+
prior = Capybara.default_max_wait_time
|
30
|
+
Capybara.default_max_wait_time = 4
|
31
|
+
expect do
|
32
|
+
subject.without_waiting do
|
33
|
+
raise 'error'
|
34
|
+
end
|
35
|
+
end.to raise_error('error')
|
36
|
+
expect(Capybara.default_max_wait_time).to eq(4)
|
37
|
+
Capybara.default_max_wait_time = prior
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
data/spreewald.gemspec
CHANGED
@@ -26,13 +26,6 @@ Gem::Specification.new do |gem|
|
|
26
26
|
gem.add_dependency('cucumber')
|
27
27
|
gem.add_dependency('cucumber_priority', '>=0.3.0')
|
28
28
|
gem.add_dependency('rspec', '>= 2.13.0')
|
29
|
-
|
30
|
-
|
31
|
-
gem.add_development_dependency 'bundler', '~> 1.11'
|
32
|
-
gem.add_development_dependency 'rake'
|
33
|
-
gem.add_development_dependency 'pry'
|
34
|
-
|
35
|
-
# Testing
|
36
|
-
gem.add_development_dependency 'aruba', '~> 0.10.2'
|
37
|
-
gem.add_development_dependency 'geordi'
|
29
|
+
gem.add_dependency('capybara')
|
30
|
+
gem.add_dependency('xpath')
|
38
31
|
end
|
@@ -11,3 +11,7 @@
|
|
11
11
|
.form-group
|
12
12
|
= label_tag 'textarea_control_2', 'C'
|
13
13
|
= text_area_tag 'textarea_control_2', "Textarea control line 1\nTextarea control line 2\n"
|
14
|
+
.field_with_errors
|
15
|
+
.form-group
|
16
|
+
= label_tag 'textarea_control_3', 'Nested field is invalid'
|
17
|
+
= text_area_tag 'textarea_control_3', "Textarea control line 1\nTextarea control line 2\n"
|
@@ -35,53 +35,55 @@ Feature: Web steps
|
|
35
35
|
Scenario: /^the "([^\"]*)" field should( not)? have an error$/
|
36
36
|
When I go to "/forms/invalid_rails_form"
|
37
37
|
Then the "A" field should have an error
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
And the "B" field should have an error
|
39
|
+
And the "Disabled" field should have an error
|
40
|
+
And the "C" field should not have an error
|
41
|
+
And the "Nested field" field should have an error
|
41
42
|
|
42
43
|
When I go to "/forms/invalid_bootstrap3_form"
|
43
44
|
Then the "A" field should have an error
|
44
|
-
|
45
|
-
|
46
|
-
|
45
|
+
And the "B" field should have an error
|
46
|
+
And the "Disabled" field should have an error
|
47
|
+
And the "C" field should not have an error
|
47
48
|
|
48
49
|
When I go to "/forms/invalid_bootstrap4_form"
|
49
50
|
Then the "A" field should have an error
|
50
|
-
|
51
|
-
|
52
|
-
|
51
|
+
And the "B" field should have an error
|
52
|
+
And the "Disabled" field should have an error
|
53
|
+
And the "C" field should not have an error
|
53
54
|
|
54
55
|
When I set the custom field error class to "my-error"
|
55
56
|
And I go to "/forms/invalid_custom_form"
|
56
57
|
Then the "A" field should have an error
|
57
|
-
|
58
|
-
|
59
|
-
|
58
|
+
And the "B" field should have an error
|
59
|
+
And the "Disabled" field should have an error
|
60
|
+
And the "C" field should not have an error
|
60
61
|
|
61
62
|
|
62
63
|
@javascript @field_errors
|
63
64
|
Scenario: /^the "([^"]*)" field should have the error "([^"]*)"$/
|
64
65
|
When I go to "/forms/invalid_rails_form"
|
65
66
|
Then the "A" field should have the error "is invalid"
|
66
|
-
|
67
|
-
|
67
|
+
And the "B" field should have the error "is invalid"
|
68
|
+
And the "Disabled" field should have the error "is invalid"
|
69
|
+
And the "Nested field" field should have an error
|
68
70
|
|
69
71
|
When I go to "/forms/invalid_bootstrap3_form"
|
70
72
|
Then the "A" field should have the error "is invalid"
|
71
|
-
|
72
|
-
|
73
|
+
And the "B" field should have the error "is invalid"
|
74
|
+
And the "Disabled" field should have the error "is invalid"
|
73
75
|
|
74
76
|
When I go to "/forms/invalid_bootstrap4_form"
|
75
77
|
Then the "A" field should have the error "is invalid"
|
76
|
-
|
77
|
-
|
78
|
+
And the "B" field should have the error "is invalid"
|
79
|
+
And the "Disabled" field should have the error "is invalid"
|
78
80
|
|
79
81
|
When I set the custom field error class to "my-error"
|
80
82
|
And I set the custom error message xpath to "parent::*/child::*[contains(@class, "my-error-description")]"
|
81
83
|
And I go to "/forms/invalid_custom_form"
|
82
|
-
|
83
|
-
|
84
|
-
|
84
|
+
And the "A" field should have the error "is invalid"
|
85
|
+
And the "B" field should have the error "is invalid"
|
86
|
+
And the "Disabled" field should have the error "is invalid"
|
85
87
|
|
86
88
|
Scenario: /^I should see a form with the following values:$/
|
87
89
|
When I go to "/forms/form1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreewald
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -53,41 +53,13 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 2.13.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.11'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '1.11'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: pry
|
56
|
+
name: capybara
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
86
58
|
requirements:
|
87
59
|
- - ">="
|
88
60
|
- !ruby/object:Gem::Version
|
89
61
|
version: '0'
|
90
|
-
type: :
|
62
|
+
type: :runtime
|
91
63
|
prerelease: false
|
92
64
|
version_requirements: !ruby/object:Gem::Requirement
|
93
65
|
requirements:
|
@@ -95,27 +67,13 @@ dependencies:
|
|
95
67
|
- !ruby/object:Gem::Version
|
96
68
|
version: '0'
|
97
69
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 0.10.2
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 0.10.2
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: geordi
|
70
|
+
name: xpath
|
113
71
|
requirement: !ruby/object:Gem::Requirement
|
114
72
|
requirements:
|
115
73
|
- - ">="
|
116
74
|
- !ruby/object:Gem::Version
|
117
75
|
version: '0'
|
118
|
-
type: :
|
76
|
+
type: :runtime
|
119
77
|
prerelease: false
|
120
78
|
version_requirements: !ruby/object:Gem::Requirement
|
121
79
|
requirements:
|
@@ -161,6 +119,7 @@ files:
|
|
161
119
|
- lib/spreewald/table_steps.rb
|
162
120
|
- lib/spreewald/time_steps.rb
|
163
121
|
- lib/spreewald/web_steps.rb
|
122
|
+
- lib/spreewald_support/capybara_wrapper.rb
|
164
123
|
- lib/spreewald_support/comparison.rb
|
165
124
|
- lib/spreewald_support/compatibility.rb
|
166
125
|
- lib/spreewald_support/custom_matchers.rb
|
@@ -175,12 +134,14 @@ files:
|
|
175
134
|
- lib/spreewald_support/unsupported_email_header.rb
|
176
135
|
- lib/spreewald_support/version.rb
|
177
136
|
- lib/spreewald_support/web_steps_helpers.rb
|
137
|
+
- lib/spreewald_support/without_waiting.rb
|
178
138
|
- lib/steps/follow_the_link.rb
|
179
139
|
- lib/steps/show_me_the_mails.rb
|
180
140
|
- spec/spec_helper.rb
|
181
141
|
- spec/spreewald_support/comparision_spec.rb
|
182
142
|
- spec/spreewald_support/mail_to_plaintext_converter_spec.rb
|
183
143
|
- spec/spreewald_support/tolerance_for_selenium_sync_issues_spec.rb
|
144
|
+
- spec/spreewald_support/without_waiting_spec.rb
|
184
145
|
- spec/steps/follow_the_link_spec.rb
|
185
146
|
- spec/steps/show_me_the_mails_spec.rb
|
186
147
|
- spec/support/world.rb
|