spreewald 2.8.0 → 3.0.1
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/CHANGELOG.md +54 -3
- data/README.md +20 -63
- data/features/binary.feature +2 -2
- data/lib/spreewald/development_steps.rb +1 -8
- data/lib/spreewald/email_steps.rb +60 -72
- data/lib/spreewald/web_steps.rb +17 -54
- data/lib/spreewald_support/mail_finder.rb +69 -40
- data/lib/spreewald_support/version.rb +1 -1
- data/tests/rails-3_capybara-1/Gemfile.lock +1 -1
- data/tests/rails-3_capybara-2/Gemfile.lock +1 -1
- data/tests/rails-4_capybara-3/Gemfile.lock +1 -1
- data/tests/rails-6_capybara-3/Gemfile.lock +1 -1
- data/tests/rails-6_capybara-3/app/mailers/spreewald_mailer.rb +13 -1
- data/tests/shared/app/controllers/emails_controller.rb +15 -0
- data/tests/shared/app/models/mailer.rb +16 -0
- data/tests/shared/app/views/forms/checkbox_form.html.haml +3 -0
- data/tests/shared/app/views/forms/disabled_elements.html.haml +1 -0
- data/tests/shared/app/views/forms/form1.html.haml +4 -1
- data/tests/shared/app/views/forms/invalid_form.html.haml +3 -0
- data/tests/shared/app/views/mailer/email_crlf.text.erb +5 -0
- data/tests/shared/app/views/mailer/email_with_umlauts.text.erb +1 -0
- data/tests/shared/app/views/mailer/html_email_with_linebreaks.html +6 -0
- data/tests/shared/config/routes.rb +3 -0
- data/tests/shared/features/shared/email_steps.feature +107 -37
- data/tests/shared/features/shared/web_steps.feature +15 -10
- metadata +9 -5
- data/lib/spreewald/file_attachment_steps.rb +0 -22
- data/lib/spreewald/timecop_steps.rb +0 -9
|
@@ -4,6 +4,7 @@ Feature: Web steps
|
|
|
4
4
|
When I go to "/forms/form1"
|
|
5
5
|
Then the "Text control" field should contain "Text control value"
|
|
6
6
|
Then the "Text control" field should not contain "false text"
|
|
7
|
+
Then the "Disabled text control" field should contain "Disabled text control value"
|
|
7
8
|
Then the "Select control" field should contain "Label 2"
|
|
8
9
|
Then the "Select control without selection" field should contain "Label 1"
|
|
9
10
|
Then the "Textarea control" field should contain "Textarea control value"
|
|
@@ -35,17 +36,14 @@ Feature: Web steps
|
|
|
35
36
|
When I go to "/forms/invalid_form"
|
|
36
37
|
Then the "A" field should have an error
|
|
37
38
|
Then the "B" field should have an error
|
|
39
|
+
Then the "Disabled" field should have an error
|
|
38
40
|
Then the "C" field should not have an error
|
|
39
41
|
|
|
40
42
|
Scenario: /^the "([^"]*)" field should have the error "([^"]*)"$/
|
|
41
43
|
When I go to "/forms/invalid_form"
|
|
42
44
|
Then the "A" field should have the error "is invalid"
|
|
43
45
|
Then the "B" field should have the error "is invalid"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Scenario: /^the "([^"]*)" field should have no error$/
|
|
47
|
-
When I go to "/forms/invalid_form"
|
|
48
|
-
Then the "C" field should have no error
|
|
46
|
+
Then the "Disabled" field should have the error "is invalid"
|
|
49
47
|
|
|
50
48
|
|
|
51
49
|
Scenario: /^I should see a form with the following values:$/
|
|
@@ -93,6 +91,7 @@ Feature: Web steps
|
|
|
93
91
|
Scenario: /^the "([^"]*)" checkbox should( not)? be checked$/
|
|
94
92
|
When I go to "/forms/checkbox_form"
|
|
95
93
|
Then the "Checked" checkbox should be checked
|
|
94
|
+
And the "Checked disabled" checkbox should be checked
|
|
96
95
|
And the "Unchecked" checkbox should not be checked
|
|
97
96
|
|
|
98
97
|
|
|
@@ -135,7 +134,7 @@ Feature: Web steps
|
|
|
135
134
|
But the "unsorted" select should not be sorted
|
|
136
135
|
|
|
137
136
|
|
|
138
|
-
Scenario: /^Then (the tag )?"..." should
|
|
137
|
+
Scenario: /^Then (the tag )?"..." should be visible$/
|
|
139
138
|
When I go to "/static_pages/visibility"
|
|
140
139
|
Then "hidden ümläüt" should be hidden
|
|
141
140
|
And "visible ümläüt" should be visible
|
|
@@ -145,13 +144,13 @@ Feature: Web steps
|
|
|
145
144
|
|
|
146
145
|
|
|
147
146
|
@javascript
|
|
148
|
-
Scenario: /^Then (the tag )?"..." should
|
|
147
|
+
Scenario: /^Then (the tag )?"..." should be visible$/ with javascript
|
|
149
148
|
When I go to "/static_pages/visibility"
|
|
150
|
-
Then "hidden ümläüt" should
|
|
149
|
+
Then "hidden ümläüt" should be hidden
|
|
151
150
|
And "visible ümläüt" should be visible
|
|
152
151
|
And a hidden string with quotes should not be visible
|
|
153
152
|
And a visible string with quotes should be visible
|
|
154
|
-
And "hidden ümläüt" should
|
|
153
|
+
And "hidden ümläüt" should be hidden
|
|
155
154
|
|
|
156
155
|
|
|
157
156
|
Scenario: /^the "([^\"]*)" field should( not)? be visible$/
|
|
@@ -161,7 +160,7 @@ Feature: Web steps
|
|
|
161
160
|
|
|
162
161
|
Scenario: /^the "([^\"]*)" field should( not)? be visible within (.*[^:])$/
|
|
163
162
|
When I go to "/static_pages/visibility"
|
|
164
|
-
Then "content" should
|
|
163
|
+
Then "content" should be hidden within ".inside"
|
|
165
164
|
But "content" should be visible within ".outside"
|
|
166
165
|
|
|
167
166
|
@javascript
|
|
@@ -302,6 +301,12 @@ Feature: Web steps
|
|
|
302
301
|
And I should not see a link labeled "First visible link" within ".unrelated-element"
|
|
303
302
|
|
|
304
303
|
|
|
304
|
+
Scenario: /^I should( not)? see a field "([^"]*)"$/
|
|
305
|
+
When I go to "/forms/disabled_elements"
|
|
306
|
+
Then I should see a field "Enabled field #1"
|
|
307
|
+
And I should see a field "Disabled field #1"
|
|
308
|
+
|
|
309
|
+
|
|
305
310
|
Scenario: /^I should( not)? see the (?:number|amount) ([\-\d,\.]+)(?: (.*?))?$/
|
|
306
311
|
When I am on "/static_pages/numbers"
|
|
307
312
|
Then I should see the number 1
|
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
|
+
version: 3.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tobias Kraze
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-11-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cucumber
|
|
@@ -157,11 +157,9 @@ files:
|
|
|
157
157
|
- lib/spreewald/browser_tab_steps.rb
|
|
158
158
|
- lib/spreewald/development_steps.rb
|
|
159
159
|
- lib/spreewald/email_steps.rb
|
|
160
|
-
- lib/spreewald/file_attachment_steps.rb
|
|
161
160
|
- lib/spreewald/session_steps.rb
|
|
162
161
|
- lib/spreewald/table_steps.rb
|
|
163
162
|
- lib/spreewald/time_steps.rb
|
|
164
|
-
- lib/spreewald/timecop_steps.rb
|
|
165
163
|
- lib/spreewald/web_steps.rb
|
|
166
164
|
- lib/spreewald_support/comparison.rb
|
|
167
165
|
- lib/spreewald_support/compatibility.rb
|
|
@@ -348,6 +346,9 @@ files:
|
|
|
348
346
|
- tests/shared/app/views/layouts/mailer.html.erb
|
|
349
347
|
- tests/shared/app/views/layouts/mailer.text.erb
|
|
350
348
|
- tests/shared/app/views/mailer/email.text.erb
|
|
349
|
+
- tests/shared/app/views/mailer/email_crlf.text.erb
|
|
350
|
+
- tests/shared/app/views/mailer/email_with_umlauts.text.erb
|
|
351
|
+
- tests/shared/app/views/mailer/html_email_with_linebreaks.html
|
|
351
352
|
- tests/shared/app/views/mailer/html_email_with_links.haml
|
|
352
353
|
- tests/shared/app/views/mailer/text_email_with_links.text.erb
|
|
353
354
|
- tests/shared/app/views/spreewald_mailer
|
|
@@ -410,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
410
411
|
- !ruby/object:Gem::Version
|
|
411
412
|
version: '0'
|
|
412
413
|
requirements: []
|
|
413
|
-
rubygems_version: 3.
|
|
414
|
+
rubygems_version: 3.0.3
|
|
414
415
|
signing_key:
|
|
415
416
|
specification_version: 4
|
|
416
417
|
summary: Collection of useful cucumber steps.
|
|
@@ -579,6 +580,9 @@ test_files:
|
|
|
579
580
|
- tests/shared/app/views/layouts/mailer.html.erb
|
|
580
581
|
- tests/shared/app/views/layouts/mailer.text.erb
|
|
581
582
|
- tests/shared/app/views/mailer/email.text.erb
|
|
583
|
+
- tests/shared/app/views/mailer/email_crlf.text.erb
|
|
584
|
+
- tests/shared/app/views/mailer/email_with_umlauts.text.erb
|
|
585
|
+
- tests/shared/app/views/mailer/html_email_with_linebreaks.html
|
|
582
586
|
- tests/shared/app/views/mailer/html_email_with_links.haml
|
|
583
587
|
- tests/shared/app/views/mailer/text_email_with_links.text.erb
|
|
584
588
|
- tests/shared/app/views/spreewald_mailer
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# This step is deprecated and will be removed from spreewald. If you still want to use it, copy the code to your project's own steps.
|
|
2
|
-
Given /^the file "([^"]*)" was attached(?: as (?:([^"]*)\/)?([^"]*))? to the ([^"]*) above(?: at "([^"]*)")?$/ do
|
|
3
|
-
|path_to_file, container_name, relation_name, model_name, time_string|
|
|
4
|
-
|
|
5
|
-
warn "The step 'the file ... was attached to the ... above' will soon be removed from Spreewald, because we want Spreewald to be a library of steps that interact with a user interface and instead of manipulating the database directly. If you wish to further use this step please copy it over to your project's own steps."
|
|
6
|
-
|
|
7
|
-
object = model_name.camelize.constantize.last
|
|
8
|
-
time = Time.parse(time_string) if time_string.present?
|
|
9
|
-
relation_name ||= 'file'
|
|
10
|
-
|
|
11
|
-
if container_name.present?
|
|
12
|
-
container = container_name.camelize.constantize.new # Image.file = File... owner: gallery
|
|
13
|
-
container.owner = object
|
|
14
|
-
container.created_at = time if time
|
|
15
|
-
else
|
|
16
|
-
container = object # Person.avatar = File...
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
container.send("#{relation_name}=", File.new(path_to_file))
|
|
20
|
-
container.updated_at = time if time
|
|
21
|
-
container.save!
|
|
22
|
-
end.overridable
|