spreewald 4.4.3 → 4.5.0
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/.github/workflows/test.yml +3 -3
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +2 -2
- data/Gemfile.ruby266.lock +1 -1
- data/{Gemfile.ruby300 → Gemfile.ruby320} +2 -2
- data/{Gemfile.ruby300.lock → Gemfile.ruby320.lock} +20 -6
- data/lib/spreewald/web_steps.rb +1 -1
- data/lib/spreewald_support/tolerance_for_selenium_sync_issues.rb +4 -3
- data/lib/spreewald_support/version.rb +1 -1
- data/spec/spreewald_support/tolerance_for_selenium_sync_issues_spec.rb +12 -0
- data/spreewald.gemspec +6 -1
- data/tests/rails-7_capybara-3/Gemfile +1 -1
- data/tests/rails-7_capybara-3/Gemfile.lock +4 -4
- data/tests/shared/app/views/spreewald_mailer +1 -1
- metadata +8 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1920d9013d22c925f9b9b49058dc46d84228d74e79eb61cece32f1ab747e245e
|
|
4
|
+
data.tar.gz: 4ded87963d399820eed78316462402f2ded9c46384c073dd60dd7c24d7210f01
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6a16084fc64d3063c095a4eb036a236c1fdf6c395bcfb42d8f418d6cf2de7a08be7628d797ca0ebadd0786eb48ee5964a5f54577eacf05dda33ac4182b1a977
|
|
7
|
+
data.tar.gz: 14e2db739ec6f716f23ca78a83d8b8480e889b10517776547352533919adc3f58f7225e8aa666b78520b8d4c839f7c9a2046d88c14d796621707f06da9666628
|
data/.github/workflows/test.yml
CHANGED
|
@@ -14,13 +14,13 @@ jobs:
|
|
|
14
14
|
fail-fast: false
|
|
15
15
|
matrix:
|
|
16
16
|
include:
|
|
17
|
-
- ruby: 3.
|
|
17
|
+
- ruby: 3.2.0
|
|
18
18
|
gemfile: tests/rails-7_capybara-3/Gemfile
|
|
19
19
|
# Used to run rspec and integration tests for spreewald binary:
|
|
20
20
|
- ruby: 2.6.6
|
|
21
21
|
gemfile: Gemfile.ruby266
|
|
22
|
-
- ruby: 3.
|
|
23
|
-
gemfile: Gemfile.
|
|
22
|
+
- ruby: 3.2.0
|
|
23
|
+
gemfile: Gemfile.ruby320
|
|
24
24
|
env:
|
|
25
25
|
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
|
26
26
|
steps:
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.2.0
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@ 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.5.0
|
|
7
|
+
- `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
|
+
|
|
9
|
+
## 4.4.4
|
|
10
|
+
- Make `When /^(?:|I )attach the file "([^"]*)" to "([^"]*)"$/` compatible for Ruby 3.0.
|
|
11
|
+
|
|
6
12
|
## 4.4.3
|
|
7
13
|
- Improve performance of the `I should (not) see a field ...` step to not retry the query when the element is **not** expected to be there.
|
|
8
14
|
- Improve the `an email should have been sent with` step to ignore successive whitespaces after newlines in HTML mail bodies, effectively improving text matching in formatted HTML-tags.
|
data/Gemfile.lock
CHANGED
data/Gemfile.ruby266.lock
CHANGED
|
@@ -42,17 +42,30 @@ GEM
|
|
|
42
42
|
cucumber-core (~> 10.1, >= 10.1.0)
|
|
43
43
|
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
|
|
44
44
|
cucumber-messages (~> 17.1, >= 17.1.1)
|
|
45
|
+
date (3.3.3)
|
|
45
46
|
diff-lcs (1.4.4)
|
|
46
47
|
ffi (1.15.4)
|
|
47
|
-
gemika (0.
|
|
48
|
-
mail (2.
|
|
48
|
+
gemika (0.8.1)
|
|
49
|
+
mail (2.8.1)
|
|
49
50
|
mini_mime (>= 0.1.1)
|
|
51
|
+
net-imap
|
|
52
|
+
net-pop
|
|
53
|
+
net-smtp
|
|
50
54
|
mime-types (3.4.1)
|
|
51
55
|
mime-types-data (~> 3.2015)
|
|
52
56
|
mime-types-data (3.2021.1115)
|
|
53
|
-
mini_mime (1.
|
|
57
|
+
mini_mime (1.1.2)
|
|
54
58
|
multi_test (0.1.2)
|
|
55
|
-
|
|
59
|
+
net-imap (0.3.4)
|
|
60
|
+
date
|
|
61
|
+
net-protocol
|
|
62
|
+
net-pop (0.1.2)
|
|
63
|
+
net-protocol
|
|
64
|
+
net-protocol (0.2.1)
|
|
65
|
+
timeout
|
|
66
|
+
net-smtp (0.3.3)
|
|
67
|
+
net-protocol
|
|
68
|
+
nokogiri (1.14.1-x86_64-linux)
|
|
56
69
|
racc (~> 1.4)
|
|
57
70
|
racc (1.5.2)
|
|
58
71
|
rake (13.0.3)
|
|
@@ -72,6 +85,7 @@ GEM
|
|
|
72
85
|
sys-uname (1.2.2)
|
|
73
86
|
ffi (~> 1.1)
|
|
74
87
|
thor (1.1.0)
|
|
88
|
+
timeout (0.3.1)
|
|
75
89
|
|
|
76
90
|
PLATFORMS
|
|
77
91
|
x86_64-linux
|
|
@@ -80,13 +94,13 @@ DEPENDENCIES
|
|
|
80
94
|
aruba
|
|
81
95
|
cucumber
|
|
82
96
|
gemika
|
|
83
|
-
mail
|
|
97
|
+
mail (~> 2.8.0)
|
|
84
98
|
nokogiri
|
|
85
99
|
rake
|
|
86
100
|
rspec
|
|
87
101
|
|
|
88
102
|
RUBY VERSION
|
|
89
|
-
ruby 3.
|
|
103
|
+
ruby 3.2.0p0
|
|
90
104
|
|
|
91
105
|
BUNDLED WITH
|
|
92
106
|
2.2.3
|
data/lib/spreewald/web_steps.rb
CHANGED
|
@@ -165,7 +165,7 @@ When /^(?:|I )attach the file "([^"]*)" to "([^"]*)"$/ do |path, field|
|
|
|
165
165
|
options[:make_visible] = true if javascript_capable?
|
|
166
166
|
|
|
167
167
|
patiently do
|
|
168
|
-
attach_file(field, File.expand_path(path), options)
|
|
168
|
+
attach_file(field, File.expand_path(path), **options)
|
|
169
169
|
end
|
|
170
170
|
end.overridable
|
|
171
171
|
|
|
@@ -39,16 +39,17 @@ module ToleranceForSeleniumSyncIssues
|
|
|
39
39
|
WAIT_PERIOD = 0.05
|
|
40
40
|
|
|
41
41
|
def patiently(seconds, &block)
|
|
42
|
-
|
|
42
|
+
patiently_started = monotonic_time
|
|
43
43
|
tries = 0
|
|
44
44
|
begin
|
|
45
45
|
tries += 1
|
|
46
|
+
block_started = monotonic_time
|
|
46
47
|
block.call
|
|
47
48
|
rescue Exception => e
|
|
48
49
|
raise e unless retryable_error?(e)
|
|
49
|
-
raise e if (
|
|
50
|
+
raise e if (block_started - patiently_started > seconds && tries >= 2)
|
|
50
51
|
sleep(WAIT_PERIOD)
|
|
51
|
-
raise Capybara::FrozenInTime, "time appears to be frozen, Capybara does not work with libraries which freeze time, consider using time travelling instead" if monotonic_time ==
|
|
52
|
+
raise Capybara::FrozenInTime, "time appears to be frozen, Capybara does not work with libraries which freeze time, consider using time travelling instead" if monotonic_time == patiently_started
|
|
52
53
|
retry
|
|
53
54
|
end
|
|
54
55
|
end
|
|
@@ -105,6 +105,18 @@ describe ToleranceForSeleniumSyncIssues do
|
|
|
105
105
|
expect(count).to be > 1
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
+
it 'retries the block if the given time has been used within the last retry (see issue #202)' do
|
|
109
|
+
count = 0
|
|
110
|
+
expect {
|
|
111
|
+
subject.patiently do
|
|
112
|
+
count += 1
|
|
113
|
+
sleep wait_time if count == 2
|
|
114
|
+
raise Capybara::ElementNotFound
|
|
115
|
+
end
|
|
116
|
+
}.to raise_error(Capybara::ElementNotFound)
|
|
117
|
+
expect(count).to be > 2
|
|
118
|
+
end
|
|
119
|
+
|
|
108
120
|
it 'will retry an outer patiently block if an inner patiently block took up all the time' do
|
|
109
121
|
try = 0
|
|
110
122
|
expect {
|
data/spreewald.gemspec
CHANGED
|
@@ -9,7 +9,12 @@ Gem::Specification.new do |gem|
|
|
|
9
9
|
gem.summary = %q{Collection of useful cucumber steps.}
|
|
10
10
|
gem.homepage = "https://github.com/makandra/spreewald"
|
|
11
11
|
gem.license = 'MIT'
|
|
12
|
-
gem.metadata = {
|
|
12
|
+
gem.metadata = {
|
|
13
|
+
'source_code_uri' => gem.homepage,
|
|
14
|
+
'bug_tracker_uri' => gem.homepage + '/issues',
|
|
15
|
+
'changelog_uri' => gem.homepage + '/blob/master/CHANGELOG.md',
|
|
16
|
+
'rubygems_mfa_required' => 'true',
|
|
17
|
+
}
|
|
13
18
|
|
|
14
19
|
gem.files = `git ls-files`.split($\)
|
|
15
20
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ../..
|
|
3
3
|
specs:
|
|
4
|
-
spreewald (4.4.
|
|
4
|
+
spreewald (4.4.4)
|
|
5
5
|
cucumber
|
|
6
6
|
cucumber_priority (>= 0.3.0)
|
|
7
7
|
rspec (>= 2.13.0)
|
|
@@ -145,7 +145,7 @@ GEM
|
|
|
145
145
|
erubi (1.10.0)
|
|
146
146
|
erubis (2.7.0)
|
|
147
147
|
ffi (1.15.5)
|
|
148
|
-
gemika (0.
|
|
148
|
+
gemika (0.8.1)
|
|
149
149
|
globalid (1.0.0)
|
|
150
150
|
activesupport (>= 5.0)
|
|
151
151
|
haml (5.2.1)
|
|
@@ -197,7 +197,7 @@ GEM
|
|
|
197
197
|
net-protocol
|
|
198
198
|
timeout
|
|
199
199
|
nio4r (2.5.8)
|
|
200
|
-
nokogiri (1.
|
|
200
|
+
nokogiri (1.14.1-x86_64-linux)
|
|
201
201
|
racc (~> 1.4)
|
|
202
202
|
pry (0.14.0)
|
|
203
203
|
coderay (~> 1.1)
|
|
@@ -304,7 +304,7 @@ DEPENDENCIES
|
|
|
304
304
|
webrick
|
|
305
305
|
|
|
306
306
|
RUBY VERSION
|
|
307
|
-
ruby 3.
|
|
307
|
+
ruby 3.2.0p0
|
|
308
308
|
|
|
309
309
|
BUNDLED WITH
|
|
310
310
|
2.2.24
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
mailer
|
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.5.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:
|
|
11
|
+
date: 2023-04-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cucumber
|
|
@@ -140,8 +140,8 @@ files:
|
|
|
140
140
|
- Gemfile.lock
|
|
141
141
|
- Gemfile.ruby266
|
|
142
142
|
- Gemfile.ruby266.lock
|
|
143
|
-
- Gemfile.
|
|
144
|
-
- Gemfile.
|
|
143
|
+
- Gemfile.ruby320
|
|
144
|
+
- Gemfile.ruby320.lock
|
|
145
145
|
- LICENSE
|
|
146
146
|
- README.md
|
|
147
147
|
- Rakefile
|
|
@@ -335,6 +335,9 @@ homepage: https://github.com/makandra/spreewald
|
|
|
335
335
|
licenses:
|
|
336
336
|
- MIT
|
|
337
337
|
metadata:
|
|
338
|
+
source_code_uri: https://github.com/makandra/spreewald
|
|
339
|
+
bug_tracker_uri: https://github.com/makandra/spreewald/issues
|
|
340
|
+
changelog_uri: https://github.com/makandra/spreewald/blob/master/CHANGELOG.md
|
|
338
341
|
rubygems_mfa_required: 'true'
|
|
339
342
|
post_install_message:
|
|
340
343
|
rdoc_options: []
|
|
@@ -351,7 +354,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
351
354
|
- !ruby/object:Gem::Version
|
|
352
355
|
version: '0'
|
|
353
356
|
requirements: []
|
|
354
|
-
rubygems_version: 3.
|
|
357
|
+
rubygems_version: 3.4.1
|
|
355
358
|
signing_key:
|
|
356
359
|
specification_version: 4
|
|
357
360
|
summary: Collection of useful cucumber steps.
|