spreewald 4.2.2 → 4.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +0 -5
- data/CHANGELOG.md +22 -0
- data/Gemfile.lock +3 -3
- data/Gemfile.ruby266.lock +59 -42
- data/Gemfile.ruby300.lock +37 -53
- data/README.md +10 -19
- data/Rakefile +5 -11
- data/examples/paths.rb +7 -0
- data/features/binary.feature +12 -8
- data/lib/spreewald/web_steps.rb +53 -50
- data/lib/spreewald_support/field_errors.rb +56 -0
- data/lib/spreewald_support/version.rb +1 -1
- data/support/step_definition.rb +11 -0
- data/support/step_manager.rb +1 -1
- data/tests/rails-6_capybara-3/Gemfile.lock +1 -1
- data/tests/rails-6_capybara-3/features/step_definitions/field_error_steps.rb +12 -0
- data/tests/shared/app/controllers/forms_controller.rb +11 -2
- data/tests/shared/app/controllers/static_pages_controller.rb +3 -0
- data/tests/shared/app/views/forms/invalid_bootstrap3_form.html.haml +16 -0
- data/tests/shared/app/views/forms/invalid_bootstrap4_form.html.haml +18 -0
- data/tests/shared/app/views/forms/invalid_custom_form.html.haml +19 -0
- data/tests/shared/app/views/forms/{invalid_form.html.haml → invalid_rails_form.html.haml} +0 -0
- data/tests/shared/app/views/static_pages/should_see.haml +7 -0
- data/tests/shared/config/routes.rb +5 -1
- data/tests/shared/features/shared/iframe_steps.feature +1 -2
- data/tests/shared/features/shared/web_steps.feature +72 -15
- metadata +15 -112
- data/Gemfile.ruby245 +0 -10
- data/Gemfile.ruby245.lock +0 -73
- data/tests/rails-4_capybara-2/Gemfile +0 -24
- data/tests/rails-4_capybara-2/Gemfile.lock +0 -230
- data/tests/rails-4_capybara-2/README.rdoc +0 -28
- data/tests/rails-4_capybara-2/Rakefile +0 -6
- data/tests/rails-4_capybara-2/app +0 -1
- data/tests/rails-4_capybara-2/bin/bundle +0 -3
- data/tests/rails-4_capybara-2/bin/rails +0 -4
- data/tests/rails-4_capybara-2/bin/rake +0 -4
- data/tests/rails-4_capybara-2/bin/setup +0 -29
- data/tests/rails-4_capybara-2/config/application.rb +0 -35
- data/tests/rails-4_capybara-2/config/boot.rb +0 -3
- data/tests/rails-4_capybara-2/config/cucumber.yml +0 -8
- data/tests/rails-4_capybara-2/config/database.yml +0 -18
- data/tests/rails-4_capybara-2/config/environment.rb +0 -5
- data/tests/rails-4_capybara-2/config/environments/development.rb +0 -28
- data/tests/rails-4_capybara-2/config/environments/test.rb +0 -42
- data/tests/rails-4_capybara-2/config/initializers/backtrace_silencers.rb +0 -7
- data/tests/rails-4_capybara-2/config/initializers/cookies_serializer.rb +0 -3
- data/tests/rails-4_capybara-2/config/initializers/filter_parameter_logging.rb +0 -4
- data/tests/rails-4_capybara-2/config/initializers/inflections.rb +0 -16
- data/tests/rails-4_capybara-2/config/initializers/mime_types.rb +0 -4
- data/tests/rails-4_capybara-2/config/initializers/session_store.rb +0 -3
- data/tests/rails-4_capybara-2/config/initializers/silence_deprecation_warnings.rb +0 -11
- data/tests/rails-4_capybara-2/config/initializers/to_time_preserves_timezone.rb +0 -10
- data/tests/rails-4_capybara-2/config/initializers/wrap_parameters.rb +0 -14
- data/tests/rails-4_capybara-2/config/locales/en.yml +0 -23
- data/tests/rails-4_capybara-2/config/routes.rb +0 -1
- data/tests/rails-4_capybara-2/config/secrets.yml +0 -22
- data/tests/rails-4_capybara-2/config.ru +0 -4
- data/tests/rails-4_capybara-2/db +0 -1
- data/tests/rails-4_capybara-2/features/browser_tab_steps.feature +0 -1
- data/tests/rails-4_capybara-2/features/development_steps.feature +0 -1
- data/tests/rails-4_capybara-2/features/email_steps.feature +0 -1
- data/tests/rails-4_capybara-2/features/iframe_steps.feature +0 -1
- data/tests/rails-4_capybara-2/features/overriding.feature +0 -1
- data/tests/rails-4_capybara-2/features/session_steps.feature +0 -1
- data/tests/rails-4_capybara-2/features/step_definitions/overriding_steps.rb +0 -1
- data/tests/rails-4_capybara-2/features/step_definitions/test_steps.rb +0 -1
- data/tests/rails-4_capybara-2/features/support/env.rb +0 -66
- data/tests/rails-4_capybara-2/features/support/paths.rb +0 -1
- data/tests/rails-4_capybara-2/features/support/selectors.rb +0 -1
- data/tests/rails-4_capybara-2/features/support/selenium.rb +0 -1
- data/tests/rails-4_capybara-2/features/table_steps.feature +0 -1
- data/tests/rails-4_capybara-2/features/time_steps.feature +0 -1
- data/tests/rails-4_capybara-2/features/web_steps.feature +0 -1
- data/tests/rails-4_capybara-2/lib/tasks/cucumber.rake +0 -65
- data/tests/rails-4_capybara-2/log/.keep +0 -0
- data/tests/rails-4_capybara-2/public/404.html +0 -67
- data/tests/rails-4_capybara-2/public/422.html +0 -67
- data/tests/rails-4_capybara-2/public/500.html +0 -66
- data/tests/rails-4_capybara-2/public/favicon.ico +0 -0
- data/tests/rails-4_capybara-2/public/fixture_files +0 -1
- data/tests/rails-4_capybara-2/script/cucumber +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f34885277a60b29d3517bbd0184b7af2dbf9f6240260f78abd4b448ea2d0162
|
4
|
+
data.tar.gz: bea792896988996ad517bc931db34a53153f14047523cfd81497bb67398edeec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ebfa401560e88582c1e9a1cd2ce1ee519f680cafcf2ce21e847d176185ab41eae03df04c37feb307b7c24cab13d8941b32485d3ca3bf048012bae76d3e05785
|
7
|
+
data.tar.gz: 547978935df291a82c4af3e7786697e78cd9406a7199e4a4e80a38b216b263806b61ae0b72ed9e61dec1e5bd87fd4d2cc8baf4c8c065899a0e31c7f353d41642
|
data/.github/workflows/test.yml
CHANGED
@@ -14,14 +14,9 @@ jobs:
|
|
14
14
|
fail-fast: false
|
15
15
|
matrix:
|
16
16
|
include:
|
17
|
-
# Test projects
|
18
|
-
- ruby: 2.4.5
|
19
|
-
gemfile: tests/rails-4_capybara-2/Gemfile
|
20
17
|
- ruby: 3.0.0
|
21
18
|
gemfile: tests/rails-6_capybara-3/Gemfile
|
22
19
|
# Used to run rspec and integration tests for spreewald binary:
|
23
|
-
- ruby: 2.4.5
|
24
|
-
gemfile: Gemfile.ruby245
|
25
20
|
- ruby: 2.6.6
|
26
21
|
gemfile: Gemfile.ruby266
|
27
22
|
- ruby: 3.0.0
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,28 @@ 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.3.4
|
7
|
+
- Fix "undefined method `build_rb_world_factory` for nil:NilClass" error when running tests on a real project'
|
8
|
+
- The field error class couldn't be required in certain circumstances and so the specs failed
|
9
|
+
|
10
|
+
## 4.3.3
|
11
|
+
- Fixes that the `Spreewald.field_error_class` configuration
|
12
|
+
did not find the correct elements
|
13
|
+
|
14
|
+
## 4.3.2
|
15
|
+
- Added built-in support for Rails and Bootstrap (3-5) error classes to the steps
|
16
|
+
- `The ... field should have the error ...`
|
17
|
+
- `The ... field should have an error`
|
18
|
+
- Added the possibility to specify custom error classes and message selectors for these steps
|
19
|
+
using `Spreewald.field_error_class` and `Spreewald.error_message_xpath_selector` in your configuration.
|
20
|
+
|
21
|
+
- We had separate steps for e.g. `I should see ...` and `I should not see ...`. These were merged now:
|
22
|
+
- `I should see "..."` + `I should not see "..."` => `I should( not)? see "..."`
|
23
|
+
- `I should see /.../` + `I should not see /.../` => `I should( not)? see /.../`
|
24
|
+
- `I should see '...'` + `I should not see '...'` => `I should( not)? see '...'`
|
25
|
+
- Optional negation was made more consistent. The steps use `"( not)? "` now.
|
26
|
+
- The search via `spreewald some query here` includes steps with optional negation now.
|
27
|
+
|
6
28
|
## 4.2.2
|
7
29
|
- Fixes the "Show me the email" step (#171)
|
8
30
|
- Fixes the "I follow the link in the email" step. (#172, #173)
|
data/Gemfile.lock
CHANGED
data/Gemfile.ruby266.lock
CHANGED
@@ -1,60 +1,77 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
aruba (
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
aruba (2.0.0)
|
5
|
+
bundler (>= 1.17, < 3.0)
|
6
|
+
childprocess (>= 2.0, < 5.0)
|
7
|
+
contracts (>= 0.16.0, < 0.18.0)
|
8
|
+
cucumber (>= 4.0, < 8.0)
|
9
9
|
rspec-expectations (~> 3.4)
|
10
10
|
thor (~> 1.0)
|
11
|
-
backports (3.17.0)
|
12
11
|
builder (3.2.4)
|
13
|
-
childprocess (
|
12
|
+
childprocess (4.0.0)
|
14
13
|
contracts (0.16.0)
|
15
|
-
cucumber (
|
16
|
-
builder (>= 2.
|
17
|
-
cucumber-core (~>
|
18
|
-
cucumber-
|
19
|
-
cucumber-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
cucumber-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
14
|
+
cucumber (7.1.0)
|
15
|
+
builder (~> 3.2, >= 3.2.4)
|
16
|
+
cucumber-core (~> 10.1, >= 10.1.0)
|
17
|
+
cucumber-create-meta (~> 6.0, >= 6.0.1)
|
18
|
+
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
|
19
|
+
cucumber-gherkin (~> 22.0, >= 22.0.0)
|
20
|
+
cucumber-html-formatter (~> 17.0, >= 17.0.0)
|
21
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
22
|
+
cucumber-wire (~> 6.2, >= 6.2.0)
|
23
|
+
diff-lcs (~> 1.4, >= 1.4.4)
|
24
|
+
mime-types (~> 3.3, >= 3.3.1)
|
25
|
+
multi_test (~> 0.1, >= 0.1.2)
|
26
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
27
|
+
cucumber-core (10.1.0)
|
28
|
+
cucumber-gherkin (~> 22.0, >= 22.0.0)
|
29
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
30
|
+
cucumber-tag-expressions (~> 4.0, >= 4.0.2)
|
31
|
+
cucumber-create-meta (6.0.4)
|
32
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
33
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
34
|
+
cucumber-cucumber-expressions (14.0.0)
|
35
|
+
cucumber-gherkin (22.0.0)
|
36
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
37
|
+
cucumber-html-formatter (17.0.0)
|
38
|
+
cucumber-messages (~> 17.1, >= 17.1.0)
|
39
|
+
cucumber-messages (17.1.1)
|
40
|
+
cucumber-tag-expressions (4.1.0)
|
41
|
+
cucumber-wire (6.2.0)
|
42
|
+
cucumber-core (~> 10.1, >= 10.1.0)
|
43
|
+
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
|
44
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
45
|
+
diff-lcs (1.4.4)
|
46
|
+
ffi (1.15.4)
|
47
|
+
gemika (0.6.1)
|
35
48
|
mail (2.7.1)
|
36
49
|
mini_mime (>= 0.1.1)
|
37
|
-
|
38
|
-
|
50
|
+
mime-types (3.4.1)
|
51
|
+
mime-types-data (~> 3.2015)
|
52
|
+
mime-types-data (3.2021.1115)
|
53
|
+
mini_mime (1.1.2)
|
39
54
|
multi_test (0.1.2)
|
40
55
|
nokogiri (1.11.1-x86_64-linux)
|
41
56
|
racc (~> 1.4)
|
42
57
|
racc (1.5.2)
|
43
58
|
rake (13.0.3)
|
44
|
-
rspec (3.
|
45
|
-
rspec-core (~> 3.
|
46
|
-
rspec-expectations (~> 3.
|
47
|
-
rspec-mocks (~> 3.
|
48
|
-
rspec-core (3.
|
49
|
-
rspec-support (~> 3.
|
50
|
-
rspec-expectations (3.
|
59
|
+
rspec (3.10.0)
|
60
|
+
rspec-core (~> 3.10.0)
|
61
|
+
rspec-expectations (~> 3.10.0)
|
62
|
+
rspec-mocks (~> 3.10.0)
|
63
|
+
rspec-core (3.10.1)
|
64
|
+
rspec-support (~> 3.10.0)
|
65
|
+
rspec-expectations (3.10.1)
|
51
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
52
|
-
rspec-support (~> 3.
|
53
|
-
rspec-mocks (3.
|
67
|
+
rspec-support (~> 3.10.0)
|
68
|
+
rspec-mocks (3.10.2)
|
54
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
55
|
-
rspec-support (~> 3.
|
56
|
-
rspec-support (3.
|
57
|
-
|
70
|
+
rspec-support (~> 3.10.0)
|
71
|
+
rspec-support (3.10.2)
|
72
|
+
sys-uname (1.2.2)
|
73
|
+
ffi (~> 1.1)
|
74
|
+
thor (1.1.0)
|
58
75
|
|
59
76
|
PLATFORMS
|
60
77
|
ruby
|
@@ -72,4 +89,4 @@ RUBY VERSION
|
|
72
89
|
ruby 2.6.6p146
|
73
90
|
|
74
91
|
BUNDLED WITH
|
75
|
-
2.2.
|
92
|
+
2.2.17
|
data/Gemfile.ruby300.lock
CHANGED
@@ -1,71 +1,59 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
|
5
|
-
|
6
|
-
i18n (>= 1.6, < 2)
|
7
|
-
minitest (>= 5.1)
|
8
|
-
tzinfo (~> 2.0)
|
9
|
-
zeitwerk (~> 2.3)
|
10
|
-
aruba (1.0.4)
|
4
|
+
aruba (2.0.0)
|
5
|
+
bundler (>= 1.17, < 3.0)
|
11
6
|
childprocess (>= 2.0, < 5.0)
|
12
|
-
contracts (
|
13
|
-
cucumber (>=
|
7
|
+
contracts (>= 0.16.0, < 0.18.0)
|
8
|
+
cucumber (>= 4.0, < 8.0)
|
14
9
|
rspec-expectations (~> 3.4)
|
15
10
|
thor (~> 1.0)
|
16
11
|
builder (3.2.4)
|
17
12
|
childprocess (4.0.0)
|
18
|
-
concurrent-ruby (1.1.8)
|
19
13
|
contracts (0.16.0)
|
20
|
-
cucumber (
|
14
|
+
cucumber (7.1.0)
|
21
15
|
builder (~> 3.2, >= 3.2.4)
|
22
|
-
cucumber-core (~>
|
23
|
-
cucumber-create-meta (~>
|
24
|
-
cucumber-cucumber-expressions (~>
|
25
|
-
cucumber-gherkin (~>
|
26
|
-
cucumber-html-formatter (~>
|
27
|
-
cucumber-messages (~>
|
28
|
-
cucumber-wire (~>
|
16
|
+
cucumber-core (~> 10.1, >= 10.1.0)
|
17
|
+
cucumber-create-meta (~> 6.0, >= 6.0.1)
|
18
|
+
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
|
19
|
+
cucumber-gherkin (~> 22.0, >= 22.0.0)
|
20
|
+
cucumber-html-formatter (~> 17.0, >= 17.0.0)
|
21
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
22
|
+
cucumber-wire (~> 6.2, >= 6.2.0)
|
29
23
|
diff-lcs (~> 1.4, >= 1.4.4)
|
24
|
+
mime-types (~> 3.3, >= 3.3.1)
|
30
25
|
multi_test (~> 0.1, >= 0.1.2)
|
31
|
-
sys-uname (~> 1.2, >= 1.2.
|
32
|
-
cucumber-core (
|
33
|
-
cucumber-gherkin (~>
|
34
|
-
cucumber-messages (~>
|
35
|
-
cucumber-tag-expressions (~>
|
36
|
-
cucumber-create-meta (
|
37
|
-
cucumber-messages (~>
|
38
|
-
sys-uname (~> 1.2, >= 1.2.
|
39
|
-
cucumber-cucumber-expressions (
|
40
|
-
cucumber-gherkin (
|
41
|
-
cucumber-messages (~>
|
42
|
-
cucumber-html-formatter (
|
43
|
-
cucumber-messages (~>
|
44
|
-
cucumber-messages (
|
45
|
-
|
46
|
-
cucumber-
|
47
|
-
|
48
|
-
cucumber-
|
49
|
-
cucumber-
|
50
|
-
cucumber-messages (~> 13.0, >= 13.0.1)
|
26
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
27
|
+
cucumber-core (10.1.0)
|
28
|
+
cucumber-gherkin (~> 22.0, >= 22.0.0)
|
29
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
30
|
+
cucumber-tag-expressions (~> 4.0, >= 4.0.2)
|
31
|
+
cucumber-create-meta (6.0.4)
|
32
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
33
|
+
sys-uname (~> 1.2, >= 1.2.2)
|
34
|
+
cucumber-cucumber-expressions (14.0.0)
|
35
|
+
cucumber-gherkin (22.0.0)
|
36
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
37
|
+
cucumber-html-formatter (17.0.0)
|
38
|
+
cucumber-messages (~> 17.1, >= 17.1.0)
|
39
|
+
cucumber-messages (17.1.1)
|
40
|
+
cucumber-tag-expressions (4.1.0)
|
41
|
+
cucumber-wire (6.2.0)
|
42
|
+
cucumber-core (~> 10.1, >= 10.1.0)
|
43
|
+
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
|
44
|
+
cucumber-messages (~> 17.1, >= 17.1.1)
|
51
45
|
diff-lcs (1.4.4)
|
52
|
-
ffi (1.15.
|
53
|
-
gemika (0.
|
54
|
-
i18n (1.8.10)
|
55
|
-
concurrent-ruby (~> 1.0)
|
46
|
+
ffi (1.15.4)
|
47
|
+
gemika (0.6.1)
|
56
48
|
mail (2.7.1)
|
57
49
|
mini_mime (>= 0.1.1)
|
58
|
-
|
50
|
+
mime-types (3.4.1)
|
51
|
+
mime-types-data (~> 3.2015)
|
52
|
+
mime-types-data (3.2021.1115)
|
59
53
|
mini_mime (1.0.3)
|
60
|
-
minitest (5.14.4)
|
61
54
|
multi_test (0.1.2)
|
62
55
|
nokogiri (1.11.2-x86_64-linux)
|
63
56
|
racc (~> 1.4)
|
64
|
-
protobuf-cucumber (3.10.8)
|
65
|
-
activesupport (>= 3.2)
|
66
|
-
middleware
|
67
|
-
thor
|
68
|
-
thread_safe
|
69
57
|
racc (1.5.2)
|
70
58
|
rake (13.0.3)
|
71
59
|
rspec (3.10.0)
|
@@ -84,10 +72,6 @@ GEM
|
|
84
72
|
sys-uname (1.2.2)
|
85
73
|
ffi (~> 1.1)
|
86
74
|
thor (1.1.0)
|
87
|
-
thread_safe (0.3.6)
|
88
|
-
tzinfo (2.0.4)
|
89
|
-
concurrent-ruby (~> 1.0)
|
90
|
-
zeitwerk (2.4.2)
|
91
75
|
|
92
76
|
PLATFORMS
|
93
77
|
x86_64-linux
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
## Supported versions
|
23
23
|
|
24
|
-
Spreewald is currently tested against
|
24
|
+
Spreewald is currently tested against and Ruby 2.6.6 with Rails 6 and Capybara 3.
|
25
25
|
|
26
26
|
## Usage
|
27
27
|
|
@@ -298,7 +298,7 @@ the step definitions.
|
|
298
298
|
* **When I switch back to the whole page**
|
299
299
|
|
300
300
|
This step can be used to switch back to the whole page if you switched
|
301
|
-
to operating inside an iframe before (step `I switch to the ... iframe`)
|
301
|
+
to operating inside an iframe before (step `I switch to the ... iframe`).
|
302
302
|
|
303
303
|
Please note: This step is only available for Capybara >= 3.
|
304
304
|
|
@@ -460,26 +460,20 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
460
460
|
Attach a file to a file upload form field
|
461
461
|
|
462
462
|
|
463
|
-
* **Then I should see "..."**
|
463
|
+
* **Then I should( not)? see "..."**
|
464
464
|
|
465
465
|
Checks that some text appears on the page
|
466
466
|
|
467
467
|
Note that this does not detect if the text might be hidden via CSS
|
468
468
|
|
469
469
|
|
470
|
-
* **Then I should see /.../**
|
470
|
+
* **Then I should( not)? see /.../**
|
471
471
|
|
472
472
|
Checks that a regexp appears on the page
|
473
473
|
|
474
474
|
Note that this does not detect if the text might be hidden via CSS
|
475
475
|
|
476
476
|
|
477
|
-
* **Then I should not see "..."**
|
478
|
-
|
479
|
-
|
480
|
-
* **Then I should not see /.../**
|
481
|
-
|
482
|
-
|
483
477
|
* **Then I should( not)? see a field "..."**
|
484
478
|
|
485
479
|
Checks for the existance of an input field (given its id or label)
|
@@ -494,26 +488,23 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
494
488
|
See [here](https://makandracards.com/makandra/1225-test-that-a-number-or-money-amount-is-shown-with-cucumber) for details
|
495
489
|
|
496
490
|
|
497
|
-
* **Then I should see '...'**
|
491
|
+
* **Then I should( not)? see '...'**
|
498
492
|
|
499
493
|
Like `Then I should see`, but with single instead of double quotes. In case
|
500
494
|
the expected string contains quotes as well.
|
501
495
|
|
502
496
|
|
503
|
-
* **Then I should see "..." in the HTML**
|
497
|
+
* **Then I should( not)? see "..." in the HTML**
|
504
498
|
|
505
499
|
Check that the raw HTML contains a string
|
506
500
|
|
507
501
|
|
508
|
-
* **Then I should not see "..." in the HTML**
|
509
|
-
|
510
|
-
|
511
502
|
* **Then I should see an error**
|
512
503
|
|
513
504
|
Checks that status code is 400..599
|
514
505
|
|
515
506
|
|
516
|
-
* **Then I should
|
507
|
+
* **Then I should( not)? see (an|the) element "..."**
|
517
508
|
|
518
509
|
Check that an element with the given selector is present on the page.
|
519
510
|
|
@@ -525,7 +516,7 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
525
516
|
Then I should not see the element ".sidebar"
|
526
517
|
|
527
518
|
|
528
|
-
* **Then I should
|
519
|
+
* **Then I should( not)? see (an|the) element for ...**
|
529
520
|
|
530
521
|
Check that an element with the given [selector alias](https://github.com/makandra/spreewald/blob/master/examples/selectors.rb) is present on the page.
|
531
522
|
|
@@ -555,12 +546,12 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
555
546
|
Checks that the page contains a link with a given text or title attribute.
|
556
547
|
|
557
548
|
|
558
|
-
* **Then the "..." field should
|
549
|
+
* **Then the "..." field should( not)? contain "..."**
|
559
550
|
|
560
551
|
Checks that an input field contains some value (allowing * as wildcard character)
|
561
552
|
|
562
553
|
|
563
|
-
* **Then the "..." field should
|
554
|
+
* **Then the "..." field should( not)? contain:**
|
564
555
|
|
565
556
|
Checks that a multiline textarea contains some value (allowing * as wildcard character)
|
566
557
|
|
data/Rakefile
CHANGED
@@ -17,14 +17,16 @@ namespace :matrix do
|
|
17
17
|
|
18
18
|
if gemfile.nil? || ruby.nil?
|
19
19
|
warn 'Please state the Gemfile and Ruby version to be used for the Testrun!'
|
20
|
+
exit 1
|
20
21
|
else
|
21
|
-
run_tests(gemfile, ruby)
|
22
|
+
success = run_tests(gemfile, ruby)
|
23
|
+
exit success ? 0 : 1
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
25
27
|
|
26
28
|
desc "Run all tests which are available for current Ruby (#{RUBY_VERSION})"
|
27
|
-
task :tests
|
29
|
+
task :tests do
|
28
30
|
Gemika::Matrix.from_ci_config.each do |row|
|
29
31
|
run_tests(row.gemfile, row.ruby)
|
30
32
|
end
|
@@ -72,15 +74,7 @@ end
|
|
72
74
|
|
73
75
|
def cucumber_command(directory, ruby_version)
|
74
76
|
command = "cd #{directory} && BUNDLE_GEMFILE=Gemfile bundle exec cucumber --publish-quiet"
|
75
|
-
|
76
|
-
# Modern cucumber sees pending tests as failures.
|
77
|
-
# We don't want this.
|
78
|
-
command << ' --no-strict-pending'
|
79
|
-
else
|
80
|
-
# Ruby < 2.5 means the capybara 2 Test project.
|
81
|
-
# Omit scenarios that only work with modern Capybara.
|
82
|
-
command << ' --tags "not @not-capybara-2"'
|
83
|
-
end
|
77
|
+
command << ' --no-strict-pending'
|
84
78
|
command
|
85
79
|
end
|
86
80
|
|
data/examples/paths.rb
CHANGED
@@ -51,6 +51,13 @@ module NavigationHelpers
|
|
51
51
|
|
52
52
|
private
|
53
53
|
|
54
|
+
def path_to_show_or_edit(action_prose, model_prose, identifier)
|
55
|
+
model = model_prose_to_class(model_prose)
|
56
|
+
route = "#{action_prose == 'form' ? 'edit_' : ''}#{model_prose_to_route_segment(model_prose)}_path"
|
57
|
+
# For find_by_anything see https://makandracards.com/makandra/6361-find-an-activerecord-by-any-column-useful-for-cucumber-steps
|
58
|
+
send(route, model.find_by_anything!(identifier))
|
59
|
+
end
|
60
|
+
|
54
61
|
def model_prose_to_class(model_prose)
|
55
62
|
model_prose.gsub(' ', '_').classify.constantize
|
56
63
|
end
|
data/features/binary.feature
CHANGED
@@ -11,11 +11,15 @@ Feature: The `spreewald` binary
|
|
11
11
|
Then the output should contain:
|
12
12
|
"""
|
13
13
|
# All Spreewald steps containing 'should not see'
|
14
|
-
Then I should not see "..."
|
15
|
-
Then I should not see "..." in the HTML
|
16
|
-
Then I should not see
|
17
|
-
|
18
|
-
|
14
|
+
Then I should( not)? see "..."
|
15
|
+
Then I should( not)? see "..." in the HTML
|
16
|
+
Then I should( not)? see "..." inside any "..."
|
17
|
+
Then I should( not)? see '...'
|
18
|
+
Then I should( not)? see (an|the) element "..."
|
19
|
+
Then I should( not)? see (an|the) element for ...
|
20
|
+
Then I should( not)? see /.../
|
21
|
+
"""
|
22
|
+
But the output should not contain "Then show me the page"
|
19
23
|
And the output should not contain "mail"
|
20
24
|
|
21
25
|
|
@@ -43,15 +47,15 @@ Feature: The `spreewald` binary
|
|
43
47
|
"""
|
44
48
|
Then(/it strips parentheses/) do
|
45
49
|
Then /^(?:|I )should see \/([^\/]*)\/$/ do
|
46
|
-
Then(/^the "(.*?)" field should
|
50
|
+
Then(/^the "(.*?)" field should( not)? contain:$/) do
|
47
51
|
"""
|
48
52
|
|
49
53
|
When I run `spreewald`
|
50
54
|
Then the output should contain "Then it strips parentheses"
|
51
|
-
And the output should contain "Then I should see /.../"
|
55
|
+
And the output should contain "Then I should( not)? see /.../"
|
52
56
|
And the output should contain:
|
53
57
|
"""
|
54
|
-
Then the "..." field should
|
58
|
+
Then the "..." field should( not)? contain:
|
55
59
|
"""
|
56
60
|
|
57
61
|
|