spreewald 4.4.1 → 4.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/README.md +2 -2
- data/lib/spreewald/web_steps.rb +5 -10
- data/lib/spreewald_support/mail_to_plaintext_converter.rb +5 -1
- data/lib/spreewald_support/tolerance_for_selenium_sync_issues.rb +1 -0
- data/lib/spreewald_support/version.rb +1 -1
- data/tests/rails-7_capybara-3/Gemfile.lock +1 -1
- data/tests/shared/app/views/mailer/html_email_with_linebreaks.html +2 -2
- data/tests/shared/features/shared/web_steps.feature +1 -0
- 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: fafd6c66aa09488c02f829c4b64352d5fc0b8c313cbfcf3da8c8bfc9ef486192
|
4
|
+
data.tar.gz: 2839f5ae1583910b595d9df1166cf3a26696d23a7850c444715e0b965b137782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e75c55d4e317c6e67fb93f35b0eac0ed1c9aa9bc4b28a6b68f45976734e5e4ad684549052529b2ce3d3fa31e2b3ef2835cbd16da1d91af991b85811e2cfdf2fa
|
7
|
+
data.tar.gz: ab32078bf86d139a1ee68f21b27217a780eaad1784cf7dd1cf777a7fb2a4a0ceed42f7bf58e657fde8f1157984858bcd430c0d81e6dce79d51c2e032e9a20036
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,36 @@ 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.4.3
|
7
|
+
- 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
|
+
- 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.
|
9
|
+
|
10
|
+
For example, when searching for `Test` inside of the following HTML, you **no longer** need to use asterisks, because the leading whitespaces/tabs in front of `Test` are ignored:
|
11
|
+
```html
|
12
|
+
<dt>
|
13
|
+
Test
|
14
|
+
</dt>
|
15
|
+
```
|
16
|
+
|
17
|
+
```Gherkin
|
18
|
+
Then a mail should have been sent with
|
19
|
+
"""
|
20
|
+
Test
|
21
|
+
"""
|
22
|
+
```
|
23
|
+
|
24
|
+
Up to this version, the plain text was resolved to `\n Test\n` (not `\nTest\n`) so it was necessary to declare a placeholder (`*`) for whitespaces:
|
25
|
+
```Gherkin
|
26
|
+
Then a mail should have been sent with
|
27
|
+
"""
|
28
|
+
*Test
|
29
|
+
"""
|
30
|
+
```
|
31
|
+
|
32
|
+
## 4.4.2
|
33
|
+
- Add `ActionController::UrlGenerationError` to `patiently`'s retry errors.
|
34
|
+
- This will solve timing issues when e.g. using step `I should be on ...` after creating a record via AJAX
|
35
|
+
|
6
36
|
## 4.4.1
|
7
37
|
- Fix deprecation warning for `ActiveRecord::Base.default_timezone` when running with Rails 7.0 ([#191](https://github.com/makandra/spreewald/issues/191))
|
8
38
|
- Fix deprecation warning for using keyword arguments as last argument when running with ruby 2.7 ([#192](https://github.com/makandra/spreewald/issues/192))
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ Require all Spreewald steps by putting
|
|
25
25
|
into either your `support/env.rb` or `step_definitions/spreewald_steps.rb`.
|
26
26
|
|
27
27
|
Steps are grouped into a number of categories. If you only want to use a subset
|
28
|
-
of Spreewald's steps,
|
28
|
+
of Spreewald's steps, instead of `require 'spreewald/all_steps'`, you can pick
|
29
29
|
and choose single categories by requiring [single files](https://github.com/makandra/spreewald/tree/master/lib/spreewald) like this:
|
30
30
|
|
31
31
|
require 'spreewald/email_steps'
|
@@ -38,7 +38,7 @@ After that you are good to go and use the steps [described below](#steps).
|
|
38
38
|
We recommend using a `features/support/paths.rb` file in your project to define mappings between verbal phrases and your project's routes. You can then use these phrases in steps like `Then I should be on ...` or `When I go to ...`.
|
39
39
|
You can find [an example in this repository](https://github.com/makandra/spreewald/blob/master/examples/paths.rb). Please note that you may have to adapt it depending on the namespaces and other setup of your application's routes.
|
40
40
|
|
41
|
-
Similarly, you may define a `features/support/
|
41
|
+
Similarly, you may define a `features/support/selectors.rb` file in your project to define mappings of verbal phrases to CSS selectors. You can also find [an example for that in this repository](https://github.com/makandra/spreewald/blob/master/examples/selectors.rb). These mappings can be used with steps like `Then I should( not)? see (an|the) element for ...` or `When I click on the element for ...`.
|
42
42
|
|
43
43
|
We also suggest to look at our [recommended Capybara defaults](#recommended-capybara-defaults) as they impact the behavior of many Spreewald steps.
|
44
44
|
|
data/lib/spreewald/web_steps.rb
CHANGED
@@ -194,17 +194,12 @@ end.overridable
|
|
194
194
|
|
195
195
|
# Checks for the existance of an input field (given its id or label)
|
196
196
|
Then /^I should( not)? see a field "([^"]*)"$/ do |negate, name|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
rescue Capybara::ElementNotFound
|
203
|
-
# In Capybara 0.4+ #find raises an error instead of returning nil
|
204
|
-
# We must explicitely reset the field variable from a previous patiently iteration
|
205
|
-
field = nil
|
197
|
+
if negate
|
198
|
+
expect(page).to have_no_field(name)
|
199
|
+
else
|
200
|
+
patiently do
|
201
|
+
expect(page).to have_field(name, disabled: :all)
|
206
202
|
end
|
207
|
-
expect(field).send(expectation, be_present)
|
208
203
|
end
|
209
204
|
end.overridable
|
210
205
|
|
@@ -362,6 +362,7 @@ Feature: Web steps
|
|
362
362
|
When I go to "/forms/disabled_elements"
|
363
363
|
Then I should see a field "Enabled field #1"
|
364
364
|
And I should see a field "Disabled field #1"
|
365
|
+
But I should not see a field "Non-existing field"
|
365
366
|
|
366
367
|
|
367
368
|
Scenario: /^I should( not)? see the (?:number|amount) ([\-\d,\.]+)(?: (.*?))?$/
|
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.
|
4
|
+
version: 4.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|