spreewald 1.12.4 → 1.12.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -1
  3. data/README.md +4 -4
  4. data/lib/spreewald/development_steps.rb +3 -3
  5. data/lib/spreewald_support/version.rb +1 -1
  6. data/tests/rails-3_capybara-1/Gemfile.lock +1 -1
  7. data/tests/rails-3_capybara-1/app +1 -0
  8. data/tests/rails-3_capybara-1/config/cucumber.yml +1 -0
  9. data/tests/rails-3_capybara-1/config/database.yml +1 -0
  10. data/tests/rails-3_capybara-1/db +1 -0
  11. data/tests/rails-3_capybara-1/features/shared +1 -0
  12. data/tests/rails-3_capybara-1/features/support/paths.rb +1 -0
  13. data/tests/rails-3_capybara-1/features/support/selectors.rb +1 -0
  14. data/tests/rails-3_capybara-1/public +1 -0
  15. data/tests/rails-3_capybara-2/Gemfile.lock +1 -1
  16. data/tests/rails-3_capybara-2/Rakefile +1 -0
  17. data/tests/rails-3_capybara-2/app +1 -0
  18. data/tests/rails-3_capybara-2/config +1 -0
  19. data/tests/rails-3_capybara-2/db +1 -0
  20. data/tests/rails-3_capybara-2/features +1 -0
  21. data/tests/rails-3_capybara-2/public +1 -0
  22. data/tests/rails-4_capybara-3/Gemfile.lock +1 -1
  23. data/tests/rails-4_capybara-3/app +1 -0
  24. data/tests/rails-4_capybara-3/config/cucumber.yml +2 -2
  25. data/tests/rails-4_capybara-3/db +1 -0
  26. data/tests/rails-4_capybara-3/features/development_steps.feature +1 -0
  27. data/tests/rails-4_capybara-3/features/email_steps.feature +1 -0
  28. data/tests/rails-4_capybara-3/features/overriding.feature +1 -0
  29. data/tests/rails-4_capybara-3/features/step_definitions/overriding_steps.rb +1 -0
  30. data/tests/rails-4_capybara-3/features/step_definitions/test_steps.rb +1 -0
  31. data/tests/rails-4_capybara-3/features/support/paths.rb +1 -0
  32. data/tests/rails-4_capybara-3/features/support/selectors.rb +1 -0
  33. data/tests/rails-4_capybara-3/features/table_steps.feature +1 -0
  34. data/tests/rails-4_capybara-3/features/web_steps.feature +1 -0
  35. data/tests/shared/features/shared/development_steps.feature +8 -0
  36. metadata +29 -3
  37. data/tests/rails-3_capybara-1/config/cucumber.yml +0 -2
  38. data/tests/rails-3_capybara-1/config/database.yml +0 -7
  39. data/tests/rails-3_capybara-1/features/support/paths.rb +0 -16
  40. data/tests/rails-3_capybara-1/features/support/selectors.rb +0 -46
  41. data/tests/rails-3_capybara-2/Rakefile +0 -18
  42. data/tests/rails-4_capybara-3/features/email_steps.feature +0 -133
  43. data/tests/rails-4_capybara-3/features/overriding.feature +0 -5
  44. data/tests/rails-4_capybara-3/features/step_definitions/overriding_steps.rb +0 -3
  45. data/tests/rails-4_capybara-3/features/step_definitions/test_steps.rb +0 -43
  46. data/tests/rails-4_capybara-3/features/support/paths.rb +0 -16
  47. data/tests/rails-4_capybara-3/features/support/selectors.rb +0 -46
  48. data/tests/rails-4_capybara-3/features/table_steps.feature +0 -293
  49. data/tests/rails-4_capybara-3/features/web_steps.feature +0 -169
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a2a3542b9623d1cfab0efd11ae9d0fcc78a2c76
4
- data.tar.gz: c838cd39696ccc1061e0adc09145aac1d8f39843
3
+ metadata.gz: f95729608596094ed1ae6bdcff3515b239a078f4
4
+ data.tar.gz: 44b7f01fc497d11518cd74e0560c339b5ede46dc
5
5
  SHA512:
6
- metadata.gz: bdcde4e768d6262c4d30c25960834681cf733de7a0ba34eede0cfeb80415dba44f8de975146467d23882be5049d1840173b0aded0aed309fb22f21936dfe3be5
7
- data.tar.gz: d7e426b0f8118943fb25c88665a66d7a9c8421ea3ba16781c54d9d5a330666ebddb630746a2adf01dce101e2fb422c2587f204b7152e390e275acae9c330d437
6
+ metadata.gz: a5832ec111b646850eaacca4a174690d51c0c52effc5ca9a73545bbbb58861cb255abb429ce744131edfe614b1ab4884819d25025e5c7291e2cf42050926c037
7
+ data.tar.gz: '08809ced9f144f3781d8de43148909e6751057d06cb43efc81f335c87ed5c3d0c8b8397e7684394ce66d837fa3361660f7321eb8d9eeb7cec3fb2fbf2b79b485'
data/CHANGELOG.md CHANGED
@@ -3,8 +3,11 @@ 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
+ ## 1.12.5
7
+ The "it should work" step now takes an optional reason.
8
+
6
9
  ## 1.12.4
7
- The word "within" can now be used in arguments for other steps without causing errors (Issue #53)
10
+ The word "within" can now be used in arguments for other steps without causing errors ([Issue #53](https://github.com/makandra/spreewald/issues/80))
8
11
 
9
12
  ## 1.12.3
10
13
  Prevent wall of warnings when `Then console` is used multiple times in on test run ([issue](https://github.com/makandra/spreewald/issues/80))
data/README.md CHANGED
@@ -114,9 +114,9 @@ the step definitions.
114
114
 
115
115
  ### development_steps.rb
116
116
 
117
- * **Then it should work**
117
+ * **Then it should work...?**
118
118
 
119
- Marks scenario as pending
119
+ Marks scenario as pending, optionally explained with a reason.
120
120
 
121
121
 
122
122
  * **Then console**
@@ -418,7 +418,7 @@ deprecation notice. Decide for yourself whether you want to use them:
418
418
  * **Then the "..." field should have no error**
419
419
 
420
420
 
421
- * **Then the "..." checkbox should( not)? be checked**
421
+ * **Then the "..." checkbox should( not)? be checked( and disabled)?**
422
422
 
423
423
 
424
424
  * **Then the radio button "..." should( not)? be (checked|selected)**
@@ -634,7 +634,7 @@ deprecation notice. Decide for yourself whether you want to use them:
634
634
  | Beta Group |
635
635
 
636
636
 
637
- * **Then the "..." (field|button) should( not)? be disabled**
637
+ * **Then the "..." (field|button|checkbox) should( not)? be disabled**
638
638
 
639
639
  Tests that an input or button with the given label is disabled.
640
640
 
@@ -1,8 +1,8 @@
1
1
  # coding: UTF-8
2
2
 
3
- # Marks scenario as pending
4
- Then /^it should work$/ do
5
- pending
3
+ # Marks scenario as pending, optionally explained with a reason.
4
+ Then /^it should work(.+?)?$/ do |message|
5
+ pending(message)
6
6
  end.overridable
7
7
 
8
8
  # nodoc
@@ -1,3 +1,3 @@
1
1
  module Spreewald
2
- VERSION = '1.12.4'
2
+ VERSION = '1.12.5'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- spreewald (1.12.4)
4
+ spreewald (1.12.5)
5
5
  cucumber
6
6
  cucumber_priority (>= 0.3.0)
7
7
 
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-1/../shared/app
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-1/config/../../shared/config/cucumber.yml
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-1/config/../../shared/config/database.yml
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-1/../shared/db
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-1/features/../../shared/features/shared
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-1/features/support/../../../shared/features/support/paths.rb
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-1/features/support/../../../shared/features/support/selectors.rb
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-1/../shared/public
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- spreewald (1.12.4)
4
+ spreewald (1.12.5)
5
5
  cucumber
6
6
  cucumber_priority (>= 0.3.0)
7
7
 
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-2/../rails-3_capybara-1/Rakefile
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-2/../rails-3_capybara-1/app
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-2/../rails-3_capybara-1/config
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-2/../rails-3_capybara-1/db
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-2/../rails-3_capybara-1/features/
@@ -0,0 +1 @@
1
+ tests/rails-3_capybara-2/../rails-3_capybara-1/public
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- spreewald (1.12.4)
4
+ spreewald (1.12.5)
5
5
  cucumber
6
6
  cucumber_priority (>= 0.3.0)
7
7
 
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/../shared/app/
@@ -1,8 +1,8 @@
1
1
  <%
2
2
  rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
3
  rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4
- std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags 'not @wip'"
4
+ std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --no-strict-pending --tags 'not @wip'"
5
5
  %>
6
6
  default: <%= std_opts %> features
7
7
  wip: --tags @wip:3 --wip features
8
- rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags 'not @wip'
8
+ rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --no-strict-pending --tags 'not @wip'
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/../shared/db/
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/features/../../shared/features/shared/development_steps.feature
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/features/../../shared/features/shared/email_steps.feature
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/features/../../shared/features/shared/overriding.feature
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/features/step_definitions/../../../shared/features/shared/step_definitions/
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/features/step_definitions/../../../shared/features/shared/step_definitions/
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/features/support/../../../shared/features/support/paths.rb
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/features/support/../../../shared/features/support/selectors.rb
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/features/../../shared/features/shared/table_steps.feature
@@ -0,0 +1 @@
1
+ tests/rails-4_capybara-3/features/../../shared/features/shared/web_steps.feature
@@ -0,0 +1,8 @@
1
+ Feature: Development steps
2
+
3
+ Scenario: /^it should work(.+?)?$/ (without a reason)
4
+ Then it should work
5
+
6
+ Scenario: /^it should work(.+?)?$/ (with a given reason)
7
+ Then it should work once the blocker described here was fulfilled. (Feature should be pending)
8
+
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: 1.12.4
4
+ version: 1.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-02 00:00:00.000000000 Z
11
+ date: 2019-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -181,6 +181,7 @@ files:
181
181
  - tests/rails-3_capybara-1/Gemfile
182
182
  - tests/rails-3_capybara-1/Gemfile.lock
183
183
  - tests/rails-3_capybara-1/Rakefile
184
+ - tests/rails-3_capybara-1/app
184
185
  - tests/rails-3_capybara-1/config/application.rb
185
186
  - tests/rails-3_capybara-1/config/boot.rb
186
187
  - tests/rails-3_capybara-1/config/cucumber.yml
@@ -192,15 +193,23 @@ files:
192
193
  - tests/rails-3_capybara-1/config/initializers/secret_token.rb
193
194
  - tests/rails-3_capybara-1/config/initializers/session_store.rb
194
195
  - tests/rails-3_capybara-1/config/routes.rb
196
+ - tests/rails-3_capybara-1/db
197
+ - tests/rails-3_capybara-1/features/shared
195
198
  - tests/rails-3_capybara-1/features/support/env.rb
196
199
  - tests/rails-3_capybara-1/features/support/paths.rb
197
200
  - tests/rails-3_capybara-1/features/support/selectors.rb
198
201
  - tests/rails-3_capybara-1/features/support/selenium.rb
202
+ - tests/rails-3_capybara-1/public
199
203
  - tests/rails-3_capybara-2/.ruby-version
200
204
  - tests/rails-3_capybara-2/Gemfile
201
205
  - tests/rails-3_capybara-2/Gemfile.lock
202
206
  - tests/rails-3_capybara-2/Rakefile
207
+ - tests/rails-3_capybara-2/app
208
+ - tests/rails-3_capybara-2/config
203
209
  - tests/rails-3_capybara-2/config.ru
210
+ - tests/rails-3_capybara-2/db
211
+ - tests/rails-3_capybara-2/features
212
+ - tests/rails-3_capybara-2/public
204
213
  - tests/rails-3_capybara-2/script/cucumber
205
214
  - tests/rails-3_capybara-2/script/rails
206
215
  - tests/rails-4_capybara-3/.gitignore
@@ -208,6 +217,7 @@ files:
208
217
  - tests/rails-4_capybara-3/Gemfile.lock
209
218
  - tests/rails-4_capybara-3/README.rdoc
210
219
  - tests/rails-4_capybara-3/Rakefile
220
+ - tests/rails-4_capybara-3/app
211
221
  - tests/rails-4_capybara-3/bin/bundle
212
222
  - tests/rails-4_capybara-3/bin/rails
213
223
  - tests/rails-4_capybara-3/bin/rake
@@ -232,6 +242,8 @@ files:
232
242
  - tests/rails-4_capybara-3/config/locales/en.yml
233
243
  - tests/rails-4_capybara-3/config/routes.rb
234
244
  - tests/rails-4_capybara-3/config/secrets.yml
245
+ - tests/rails-4_capybara-3/db
246
+ - tests/rails-4_capybara-3/features/development_steps.feature
235
247
  - tests/rails-4_capybara-3/features/email_steps.feature
236
248
  - tests/rails-4_capybara-3/features/overriding.feature
237
249
  - tests/rails-4_capybara-3/features/step_definitions/overriding_steps.rb
@@ -275,6 +287,7 @@ files:
275
287
  - tests/shared/db/migrate/.gitignore
276
288
  - tests/shared/db/schema.rb
277
289
  - tests/shared/db/test.sqlite3
290
+ - tests/shared/features/shared/development_steps.feature
278
291
  - tests/shared/features/shared/email_steps.feature
279
292
  - tests/shared/features/shared/overriding.feature
280
293
  - tests/shared/features/shared/step_definitions/overriding_steps.rb
@@ -305,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
305
318
  version: '0'
306
319
  requirements: []
307
320
  rubyforge_project:
308
- rubygems_version: 2.2.5
321
+ rubygems_version: 2.6.14.3
309
322
  signing_key:
310
323
  specification_version: 4
311
324
  summary: Collection of useful cucumber steps.
@@ -314,6 +327,7 @@ test_files:
314
327
  - tests/rails-3_capybara-1/Gemfile
315
328
  - tests/rails-3_capybara-1/Gemfile.lock
316
329
  - tests/rails-3_capybara-1/Rakefile
330
+ - tests/rails-3_capybara-1/app
317
331
  - tests/rails-3_capybara-1/config/application.rb
318
332
  - tests/rails-3_capybara-1/config/boot.rb
319
333
  - tests/rails-3_capybara-1/config/cucumber.yml
@@ -325,15 +339,23 @@ test_files:
325
339
  - tests/rails-3_capybara-1/config/initializers/secret_token.rb
326
340
  - tests/rails-3_capybara-1/config/initializers/session_store.rb
327
341
  - tests/rails-3_capybara-1/config/routes.rb
342
+ - tests/rails-3_capybara-1/db
343
+ - tests/rails-3_capybara-1/features/shared
328
344
  - tests/rails-3_capybara-1/features/support/env.rb
329
345
  - tests/rails-3_capybara-1/features/support/paths.rb
330
346
  - tests/rails-3_capybara-1/features/support/selectors.rb
331
347
  - tests/rails-3_capybara-1/features/support/selenium.rb
348
+ - tests/rails-3_capybara-1/public
332
349
  - tests/rails-3_capybara-2/.ruby-version
333
350
  - tests/rails-3_capybara-2/Gemfile
334
351
  - tests/rails-3_capybara-2/Gemfile.lock
335
352
  - tests/rails-3_capybara-2/Rakefile
353
+ - tests/rails-3_capybara-2/app
354
+ - tests/rails-3_capybara-2/config
336
355
  - tests/rails-3_capybara-2/config.ru
356
+ - tests/rails-3_capybara-2/db
357
+ - tests/rails-3_capybara-2/features
358
+ - tests/rails-3_capybara-2/public
337
359
  - tests/rails-3_capybara-2/script/cucumber
338
360
  - tests/rails-3_capybara-2/script/rails
339
361
  - tests/rails-4_capybara-3/.gitignore
@@ -341,6 +363,7 @@ test_files:
341
363
  - tests/rails-4_capybara-3/Gemfile.lock
342
364
  - tests/rails-4_capybara-3/README.rdoc
343
365
  - tests/rails-4_capybara-3/Rakefile
366
+ - tests/rails-4_capybara-3/app
344
367
  - tests/rails-4_capybara-3/bin/bundle
345
368
  - tests/rails-4_capybara-3/bin/rails
346
369
  - tests/rails-4_capybara-3/bin/rake
@@ -365,6 +388,8 @@ test_files:
365
388
  - tests/rails-4_capybara-3/config/locales/en.yml
366
389
  - tests/rails-4_capybara-3/config/routes.rb
367
390
  - tests/rails-4_capybara-3/config/secrets.yml
391
+ - tests/rails-4_capybara-3/db
392
+ - tests/rails-4_capybara-3/features/development_steps.feature
368
393
  - tests/rails-4_capybara-3/features/email_steps.feature
369
394
  - tests/rails-4_capybara-3/features/overriding.feature
370
395
  - tests/rails-4_capybara-3/features/step_definitions/overriding_steps.rb
@@ -408,6 +433,7 @@ test_files:
408
433
  - tests/shared/db/migrate/.gitignore
409
434
  - tests/shared/db/schema.rb
410
435
  - tests/shared/db/test.sqlite3
436
+ - tests/shared/features/shared/development_steps.feature
411
437
  - tests/shared/features/shared/email_steps.feature
412
438
  - tests/shared/features/shared/overriding.feature
413
439
  - tests/shared/features/shared/step_definitions/overriding_steps.rb
@@ -1,2 +0,0 @@
1
- default: --require features --require features/shared features/shared
2
-
@@ -1,7 +0,0 @@
1
- development:
2
- adapter: sqlite3
3
- database: ":memory:"
4
-
5
- test:
6
- adapter: sqlite3
7
- database: ":memory:"
@@ -1,16 +0,0 @@
1
- module NavigationHelpers
2
-
3
- def path_to(page_name)
4
- case page_name
5
- when /^"(.*)"$/
6
- $1
7
-
8
- else
9
- raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
10
- "Now, go and add a mapping in #{__FILE__}"
11
- end
12
- end
13
-
14
- end
15
-
16
- World(NavigationHelpers)
@@ -1,46 +0,0 @@
1
- module HtmlSelectorsHelpers
2
- # Maps a name to a selector. Used primarily by the
3
- #
4
- # When /^(.+) within (.+)$/ do |step, scope|
5
- #
6
- # step definitions in web_steps.rb
7
- #
8
- def selector_for(locator)
9
- case locator
10
-
11
- when /^a panel?$/
12
- '.panel'
13
-
14
- when /^the timeline?$/
15
- '.timeline'
16
-
17
- when /^the table row containing "(.+?)"$/
18
- all('tr').detect { |tr| tr.text.include? $1 } || raise("Could not find tr containing #{$1.inspect}")
19
-
20
- # Add more mappings here.
21
- # Here is an example that pulls values out of the Regexp:
22
- #
23
- # when /^the (notice|error|info) flash$/
24
- # ".flash.#{$1}"
25
-
26
- # You can also return an array to use a different selector
27
- # type, like:
28
- #
29
- # when /the header/
30
- # [:xpath, "//header"]
31
-
32
- # This allows you to provide a quoted selector as the scope
33
- # for "within" steps as was previously the default for the
34
- # web steps:
35
- when /^"(.+)"$/
36
- $1
37
-
38
- else
39
- raise "Can't find mapping from \"#{locator}\" to a selector.\n" +
40
- "Now, go and add a mapping in #{__FILE__}"
41
- end
42
- end
43
-
44
- end
45
-
46
- World(HtmlSelectorsHelpers)
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env rake
2
- require 'cucumber/rake/task'
3
-
4
- desc 'Default: Run all specs for a specific rails version.'
5
- task :default => :features
6
-
7
- desc 'Run all specs for rails 3.2'
8
- Cucumber::Rake::Task.new(:features) do |t|
9
- feature = if ENV['SINGLE_FEATURE']
10
- "../../shared/features/shared/#{ ENV['SINGLE_FEATURE'] }"
11
- else
12
- 'features/shared'
13
- end
14
-
15
- # tell cucumber where it finds it files (subdirectories and symlinks are confusing it)
16
- t.cucumber_opts = "--require features --require features/shared #{feature}"
17
- end
18
-
@@ -1,133 +0,0 @@
1
- Feature: Test Spreewald's email steps
2
-
3
- Scenario: /^no e?mail should have been sent$/
4
- When I go to "/emails/do_nothing"
5
- Then the following step should succeed:
6
- | no email should have been sent |
7
-
8
- When I go to "/emails/send_email"
9
- Then the following step should fail:
10
- | no email should have been sent |
11
-
12
-
13
- Scenario: /^I should see "([^\"]*)" in the e?mail$/
14
- When I go to "/emails/send_email"
15
- Then the following step should succeed:
16
- | I should see "BODY" in the email |
17
- But the following step should fail:
18
- | I should see "XYZ" in the email |
19
-
20
-
21
- Scenario: /^(an|no) e?mail should have been sent with:$/
22
- When I go to "/emails/send_email"
23
-
24
- # Test without body
25
- Then the following multiline step should succeed:
26
- """
27
- Then an email should have been sent with:
28
- '''
29
- From: from@example.com
30
- Reply-To: reply-to@example.com
31
- To: to@example.com
32
- Subject: SUBJECT
33
- '''
34
- """
35
-
36
- # Test with body
37
- Then the following multiline step should succeed:
38
- """
39
- Then an email should have been sent with:
40
- '''
41
- From: from@example.com
42
- Reply-To: reply-to@example.com
43
- To: to@example.com
44
- Subject: SUBJECT
45
-
46
- BODY
47
- '''
48
- """
49
-
50
- # Test with incorrect From header
51
- Then the following multiline step should fail:
52
- """
53
- Then an email should have been sent with:
54
- '''
55
- From: other-from@example.com
56
- Reply-To: reply-to@example.com
57
- To: to@example.com
58
- Subject: SUBJECT
59
-
60
- BODY
61
- '''
62
- """
63
-
64
- # Test with incorrect Reply-To header
65
- Then the following multiline step should fail:
66
- """
67
- Then an email should have been sent with:
68
- '''
69
- From: from@example.com
70
- Reply-To: other-reply-to@example.com
71
- To: to@example.com
72
- Subject: SUBJECT
73
-
74
- BODY
75
- '''
76
- """
77
- # Test with incorrect To header
78
- Then the following multiline step should fail:
79
- """
80
- Then an email should have been sent with:
81
- '''
82
- From: from@example.com
83
- Reply-To: reply-to@example.com
84
- To: other-to@example.com
85
- Subject: SUBJECT
86
-
87
- BODY
88
- '''
89
- """
90
-
91
- # Test with incorrect Subject header
92
- Then the following multiline step should fail:
93
- """
94
- Then an email should have been sent with:
95
- '''
96
- From: from@example.com
97
- Reply-To: reply-to@example.com
98
- To: to@example.com
99
- Subject: OTHER-SUBJECT
100
-
101
- BODY
102
- '''
103
- """
104
-
105
- # Test with incorrect body
106
- Then the following multiline step should fail:
107
- """
108
- Then an email should have been sent with:
109
- '''
110
- From: from@example.com
111
- Reply-To: reply-to@example.com
112
- To: to@example.com
113
- Subject: SUBJECT
114
-
115
- OTHER-BODY
116
- '''
117
- """
118
-
119
- # Test body with multiple paragraphs
120
- Then the following multiline step should fail:
121
- """
122
- Then an email should have been sent with:
123
- '''
124
- From: from@example.com
125
- Reply-To: reply-to@example.com
126
- To: to@example.com
127
- Subject: SUBJECT
128
-
129
- BODY
130
-
131
- MORE-BODY
132
- '''
133
- """
@@ -1,5 +0,0 @@
1
- Feature: Overriding Spreewald-steps
2
-
3
- Scenario: The developer should be able to override any Spreewald step without Cucumber raising Cucumber::Ambiguous
4
- When I go to "/static_pages/overridden"
5
- Then I should see "overridden value"
@@ -1,3 +0,0 @@
1
- Then /^I should see "overridden value"$/ do
2
- page.should have_content('overridden value')
3
- end
@@ -1,43 +0,0 @@
1
- RSPEC_EXPECTATION_NOT_MET_ERROR = RSpec::Expectations::ExpectationNotMetError
2
-
3
- Then /^the following steps? should (fail|succeed):$/ do |expectation, steps_table|
4
- steps = steps_table.raw.flatten
5
-
6
- steps.each do |step|
7
- if expectation == 'fail'
8
- expect { step(step) }.to raise_error(RSPEC_EXPECTATION_NOT_MET_ERROR)
9
-
10
- else # succeed
11
- step(step)
12
- end
13
-
14
- end
15
- end
16
-
17
- When /^I run the following steps?:$/ do |steps_table|
18
- steps = steps_table.raw.flatten
19
-
20
- steps.each do |step|
21
- step(step)
22
- end
23
- end
24
-
25
- Then /^the following multiline step should (fail|succeed):$/ do |expectation, multiline_step|
26
- multiline_step = multiline_step.gsub(%{'''}, %{"""})
27
- if expectation == 'fail'
28
- expect { steps(multiline_step) }.to raise_error(RSPEC_EXPECTATION_NOT_MET_ERROR)
29
- else # succeed
30
- steps(multiline_step)
31
- end
32
-
33
- end
34
-
35
- Then(/^a hidden string with quotes should not be visible$/) do
36
- hidden_string = %Q{hidden '" quotes}
37
- assert_hidden(:text => hidden_string)
38
- end
39
-
40
- Then(/^a visible string with quotes should be visible$/) do
41
- visible_string = %Q{visible '" quotes}
42
- assert_visible(:text => visible_string)
43
- end
@@ -1,16 +0,0 @@
1
- module NavigationHelpers
2
-
3
- def path_to(page_name)
4
- case page_name
5
- when /^"(.*)"$/
6
- $1
7
-
8
- else
9
- raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
10
- "Now, go and add a mapping in #{__FILE__}"
11
- end
12
- end
13
-
14
- end
15
-
16
- World(NavigationHelpers)
@@ -1,46 +0,0 @@
1
- module HtmlSelectorsHelpers
2
- # Maps a name to a selector. Used primarily by the
3
- #
4
- # When /^(.+) within (.+)$/ do |step, scope|
5
- #
6
- # step definitions in web_steps.rb
7
- #
8
- def selector_for(locator)
9
- case locator
10
-
11
- when /^a panel?$/
12
- '.panel'
13
-
14
- when /^the timeline?$/
15
- '.timeline'
16
-
17
- when /^the table row containing "(.+?)"$/
18
- all('tr').detect { |tr| tr.text.include? $1 } || raise("Could not find tr containing #{$1.inspect}")
19
-
20
- # Add more mappings here.
21
- # Here is an example that pulls values out of the Regexp:
22
- #
23
- # when /^the (notice|error|info) flash$/
24
- # ".flash.#{$1}"
25
-
26
- # You can also return an array to use a different selector
27
- # type, like:
28
- #
29
- # when /the header/
30
- # [:xpath, "//header"]
31
-
32
- # This allows you to provide a quoted selector as the scope
33
- # for "within" steps as was previously the default for the
34
- # web steps:
35
- when /^"(.+)"$/
36
- $1
37
-
38
- else
39
- raise "Can't find mapping from \"#{locator}\" to a selector.\n" +
40
- "Now, go and add a mapping in #{__FILE__}"
41
- end
42
- end
43
-
44
- end
45
-
46
- World(HtmlSelectorsHelpers)
@@ -1,293 +0,0 @@
1
- Feature: Table steps
2
-
3
-
4
- Scenario: should see a table with the following rows
5
- When I go to "/tables/table1"
6
- Then the following multiline step should succeed:
7
- """
8
- Then I should see a table with the following rows:
9
- | 1-1 | 1-2 | 1-3 |
10
- | 2-1 | 2-2 | 2-3 |
11
- | 3-1 | 3-2 | 3-3 |
12
- """
13
- And the following multiline step should succeed:
14
- """
15
- Then I should see a table with the following rows:
16
- | 1-1 | 1-3 |
17
- | 2-1 | 2-3 |
18
- | 3-1 | 3-3 |
19
- """
20
- And the following multiline step should succeed:
21
- """
22
- Then I should see a table with the following rows:
23
- | 1-2 | 1-3 |
24
- | 2-2 | 2-3 |
25
- | 3-2 | 3-3 |
26
- """
27
- And the following multiline step should succeed:
28
- """
29
- Then I should see a table with the following rows:
30
- | 1-1 | 1-2 | 1-3 |
31
- | 3-1 | 3-2 | 3-3 |
32
- """
33
- And the following multiline step should succeed:
34
- """
35
- Then I should see a table with the following rows:
36
- | 2-1 | 2-2 | 2-3 |
37
- | 3-1 | 3-2 | 3-3 |
38
- """
39
- And the following multiline step should succeed:
40
- """
41
- Then I should see a table with the following rows:
42
- | 1-1 | 1-2 | 1-3 |
43
- | 2-1 | 2-2 | 2-3 |
44
- """
45
- And the following multiline step should succeed:
46
- """
47
- Then I should see a table with the following rows:
48
- | 1-1 | 1-3 |
49
- | 3-1 | 3-3 |
50
- """
51
- And the following multiline step should succeed:
52
- """
53
- Then I should see a table with the following rows:
54
- | 1* | 1-3 |
55
- | 3* | 3-3 |
56
- """
57
- And the following multiline step should fail:
58
- """
59
- Then I should see a table with the following rows:
60
- | 3-1 | 3-2 | 3-3 |
61
- | 1-1 | 1-2 | 1-3 |
62
- | 2-1 | 2-2 | 2-3 |
63
- """
64
- But the following multiline step should fail:
65
- """
66
- Then I should see a table with the following rows:
67
- | 1-1 | 1-2 | 1-3 |
68
- | 2-1 | 2-2 | 2-3 |
69
- | 3-1 | 3-2 | foo |
70
- """
71
- And the following multiline step should fail:
72
- """
73
- Then I should see a table with the following rows:
74
- | 1-1 | 1-2 | 1-3 |
75
- | 2-1 | foo | 2-3 |
76
- | 3-1 | 3-2 | 3-3 |
77
- """
78
- And the following multiline step should fail:
79
- """
80
- Then I should see a table with the following rows:
81
- | 1 | 1-3 |
82
- | 3 | 3-3 |
83
- """
84
-
85
-
86
- Scenario: Cell content normalization
87
- When I go to "/tables/table_with_weird_spaces"
88
- Then I should see a table with the following rows:
89
- | one two | three four |
90
- | five six | seven eight |
91
- | nineten | eleventwelve |
92
-
93
-
94
- Scenario: should not see a table with the following rows
95
- When I go to "/tables/table1"
96
- Then the following multiline step should fail:
97
- """
98
- Then I should not see a table with the following rows:
99
- | 1-1 | 1-2 | 1-3 |
100
- | 2-1 | 2-2 | 2-3 |
101
- | 3-1 | 3-2 | 3-3 |
102
- """
103
- But the following multiline step should succeed:
104
- """
105
- Then I should not see a table with the following rows:
106
- | 3-1 | 3-2 | 3-3 |
107
- | 1-1 | 1-2 | 1-3 |
108
- | 2-1 | 2-2 | 2-3 |
109
- """
110
-
111
-
112
- Scenario: should see a table with exactly the following rows
113
- When I go to "/tables/table1"
114
- Then the following multiline step should succeed:
115
- """
116
- Then I should see a table with exactly the following rows:
117
- | 1-1 | 1-2 | 1-3 |
118
- | 2-1 | 2-2 | 2-3 |
119
- | 3-1 | 3-2 | 3-3 |
120
- """
121
- And the following multiline step should succeed:
122
- """
123
- Then I should see a table with exactly the following rows:
124
- | 1-1 | 1-3 |
125
- | 2-1 | 2-3 |
126
- | 3-1 | 3-3 |
127
- """
128
- But the following multiline step should fail:
129
- """
130
- Then I should see a table with exactly the following rows:
131
- | 2-1 | 2-2 | 2-3 |
132
- | 1-1 | 1-2 | 1-3 |
133
- | 3-1 | 3-2 | 3-3 |
134
- """
135
- And the following multiline step should fail:
136
- """
137
- Then I should see a table with exactly the following rows:
138
- | 1-1 | 1-2 | 1-3 |
139
- | 3-1 | 3-2 | 3-3 |
140
- """
141
-
142
-
143
- Scenario: should not see a table with exactly the following rows
144
- When I go to "/tables/table1"
145
- Then the following multiline step should fail:
146
- """
147
- Then I should not see a table with exactly the following rows:
148
- | 1-1 | 1-2 | 1-3 |
149
- | 2-1 | 2-2 | 2-3 |
150
- | 3-1 | 3-2 | 3-3 |
151
- """
152
- And the following multiline step should fail:
153
- """
154
- Then I should not see a table with exactly the following rows:
155
- | 1-1 | 1-3 |
156
- | 2-1 | 2-3 |
157
- | 3-1 | 3-3 |
158
- """
159
- But the following multiline step should succeed:
160
- """
161
- Then I should not see a table with exactly the following rows:
162
- | 2-1 | 2-2 | 2-3 |
163
- | 1-1 | 1-2 | 1-3 |
164
- | 3-1 | 3-2 | 3-3 |
165
- """
166
- And the following multiline step should succeed:
167
- """
168
- Then I should not see a table with exactly the following rows:
169
- | 1-1 | 1-2 | 1-3 |
170
- | 3-1 | 3-2 | 3-3 |
171
- """
172
-
173
-
174
- Scenario: should see a table with the following rows in any order
175
- When I go to "/tables/table1"
176
- Then the following multiline step should succeed:
177
- """
178
- Then I should see a table with the following rows in any order:
179
- | 1-1 | 1-2 | 1-3 |
180
- | 2-1 | 2-2 | 2-3 |
181
- | 3-1 | 3-2 | 3-3 |
182
- """
183
- And the following multiline step should succeed:
184
- """
185
- Then I should see a table with the following rows in any order:
186
- | 1-1 | 1-2 | 1-3 |
187
- | 3-1 | 3-2 | 3-3 |
188
- """
189
- And the following multiline step should succeed:
190
- """
191
- Then I should see a table with the following rows in any order:
192
- | 3-1 | 3-2 | 3-3 |
193
- | 1-1 | 1-2 | 1-3 |
194
- | 2-1 | 2-2 | 2-3 |
195
- """
196
- But the following multiline step should fail:
197
- """
198
- Then I should see a table with the following rows in any order:
199
- | 1-1 | 1-2 | 1-3 |
200
- | 2-1 | 2-2 | 2-3 |
201
- | 3-1 | 3-2 | foo |
202
- """
203
- And the following multiline step should fail:
204
- """
205
- Then I should see a table with the following rows in any order:
206
- | 1 | 1-3 |
207
- | 3 | 3-3 |
208
- """
209
-
210
-
211
- Scenario: should not see a table with the following rows in any order
212
- When I go to "/tables/table1"
213
- Then the following multiline step should fail:
214
- """
215
- Then I should not see a table with the following rows in any order:
216
- | 1-1 | 1-2 | 1-3 |
217
- | 2-1 | 2-2 | 2-3 |
218
- | 3-1 | 3-2 | 3-3 |
219
- """
220
- And the following multiline step should fail:
221
- """
222
- Then I should not see a table with the following rows in any order:
223
- | 1-1 | 1-2 | 1-3 |
224
- | 3-1 | 3-2 | 3-3 |
225
- """
226
- And the following multiline step should fail:
227
- """
228
- Then I should not see a table with the following rows in any order:
229
- | 3-1 | 3-2 | 3-3 |
230
- | 1-1 | 1-2 | 1-3 |
231
- | 2-1 | 2-2 | 2-3 |
232
- """
233
- But the following multiline step should succeed:
234
- """
235
- Then I should not see a table with the following rows in any order:
236
- | 1-1 | 1-2 | 1-3 |
237
- | 2-1 | 2-2 | 2-3 |
238
- | 3-1 | 3-2 | foo |
239
- """
240
- And the following multiline step should succeed:
241
- """
242
- Then I should not see a table with the following rows in any order:
243
- | 1 | 1-3 |
244
- | 3 | 3-3 |
245
- """
246
-
247
-
248
- Scenario: should see a table with exactly the following rows in any order
249
- When I go to "/tables/table1"
250
- Then the following multiline step should succeed:
251
- """
252
- Then I should see a table with exactly the following rows in any order:
253
- | 1-1 | 1-2 | 1-3 |
254
- | 2-1 | 2-2 | 2-3 |
255
- | 3-1 | 3-2 | 3-3 |
256
- """
257
- And the following multiline step should succeed:
258
- """
259
- Then I should see a table with exactly the following rows in any order:
260
- | 3-1 | 3-2 | 3-3 |
261
- | 1-1 | 1-2 | 1-3 |
262
- | 2-1 | 2-2 | 2-3 |
263
- """
264
- But the following multiline step should fail:
265
- """
266
- Then I should see a table with exactly the following rows in any order:
267
- | 1-1 | 1-2 | 1-3 |
268
- | 3-1 | 3-2 | 3-3 |
269
- """
270
-
271
-
272
- Scenario: should not see a table with exactly the following rows in any order
273
- When I go to "/tables/table1"
274
- Then the following multiline step should fail:
275
- """
276
- Then I should not see a table with exactly the following rows in any order:
277
- | 1-1 | 1-2 | 1-3 |
278
- | 2-1 | 2-2 | 2-3 |
279
- | 3-1 | 3-2 | 3-3 |
280
- """
281
- And the following multiline step should fail:
282
- """
283
- Then I should not see a table with exactly the following rows in any order:
284
- | 3-1 | 3-2 | 3-3 |
285
- | 1-1 | 1-2 | 1-3 |
286
- | 2-1 | 2-2 | 2-3 |
287
- """
288
- But the following multiline step should succeed:
289
- """
290
- Then I should not see a table with exactly the following rows in any order:
291
- | 1-1 | 1-2 | 1-3 |
292
- | 3-1 | 3-2 | 3-3 |
293
- """
@@ -1,169 +0,0 @@
1
- Feature: Web steps
2
-
3
- Scenario: /^the "([^"]*)" field should (not )?contain "([^"]*)"$/
4
- When I go to "/forms/form1"
5
- Then the "Text control" field should contain "Text control value"
6
- Then the "Select control" field should contain "Label 2"
7
- Then the "Select control without selection" field should contain "Label 1"
8
- Then the "Textarea control" field should contain "Textarea control value"
9
- Then the "Empty control" field should contain ""
10
-
11
-
12
- Scenario: /^the "([^"]*)" field should (not )?contain:/
13
- When I go to "/forms/form2"
14
- Then the "Text control" field should contain:
15
- """
16
- Text control value
17
- """
18
- Then the "Textarea control" field should contain:
19
- """
20
- Textarea control line 1
21
- Textarea control line 2
22
- """
23
- Then the "Empty textarea control" field should contain:
24
- """
25
- """
26
-
27
-
28
- Scenario: /^I should see a form with the following values:$/
29
- When I go to "/forms/form1"
30
- Then I should see a form with the following values:
31
- | Text control | Text control value |
32
- | Select control | Label 2 |
33
- | Select control without selection | Label 1 |
34
- | Textarea control | Textarea control value |
35
- | Empty control | |
36
-
37
-
38
- Scenario: /^"([^"]*)" should( not)? be selected for "([^"]*)"$/
39
- When I go to "/forms/form1"
40
- Then "Label 2" should be selected for "Select control"
41
- But "Label 1" should not be selected for "Select control"
42
- And "Label 1" should be selected for "Select control without selection"
43
-
44
-
45
- Scenario: /^nothing should be selected for "([^"]*)"$/
46
- When I go to "/forms/form1"
47
- Then nothing should be selected for "Select control with blank option"
48
- Then nothing should be selected for "Select control with blank selection"
49
-
50
-
51
- Scenario: /^I go back$/
52
- Given I go to "/static_pages/link_to_home"
53
- And I follow "Home"
54
-
55
- When I go back
56
- Then I should be on "/static_pages/link_to_home"
57
-
58
-
59
- Scenario: /^the "([^"]*)" checkbox should( not)? be checked$/
60
- When I go to "/forms/checkbox_form"
61
- Then the "Checked" checkbox should be checked
62
- And the "Unchecked" checkbox should not be checked
63
-
64
-
65
- @javascript
66
- Scenario: /^I click on "([^\"]+)"$/
67
- When I go to "/static_pages/click_on"
68
- And I click on "Nested"
69
- # See that it clicks the innermost element with that text
70
- Then I should see "You clicked on .inner"
71
- When I click on "Button"
72
- Then I should see "You clicked on .button"
73
-
74
-
75
- @javascript
76
- Scenario: /^I click on the element "([^\"]+)"$/
77
- When I go to "/static_pages/click_on"
78
- And I click on the element ".inner"
79
- Then I should see "You clicked on .inner"
80
- When I click on the element ".button"
81
- Then I should see "You clicked on .button"
82
-
83
-
84
- @javascript
85
- Scenario: /^I click on the element for .*?$/
86
- When I go to "/static_pages/click_on"
87
- And I click on the element for a panel
88
- Then I should see "You clicked on .panel"
89
- When I click on the element for the timeline
90
- Then I should see "You clicked on .timeline"
91
-
92
-
93
- Scenario: /^the "(.*?)" select should( not)? be sorted$/
94
- When I go to "/forms/select_fields"
95
- Then the "sorted" select should be sorted
96
- But the "unsorted" select should not be sorted
97
-
98
-
99
- Scenario: /^Then (the tag )?"..." should( not)? be visible$/
100
- When I go to "/static_pages/visibility"
101
- Then "hidden ümläüt" should not be visible
102
- And "visible ümläüt" should be visible
103
- And a hidden string with quotes should not be visible
104
- And a visible string with quotes should be visible
105
- And "hidden ümläüt" should be hidden
106
-
107
-
108
- @javascript
109
- Scenario: /^Then (the tag )?"..." should( not)? be visible$/ with javascript
110
- When I go to "/static_pages/visibility"
111
- Then "hidden ümläüt" should not be visible
112
- And "visible ümläüt" should be visible
113
- And a hidden string with quotes should not be visible
114
- And a visible string with quotes should be visible
115
- And "hidden ümläüt" should be hidden
116
-
117
-
118
- Scenario: /^the "([^\"]*)" field should( not)? be visible$/
119
- When I go to "/static_pages/visibility"
120
- Then the "Visible field" field should be visible
121
- But the "Hidden field" field should not be visible
122
-
123
-
124
- @javascript
125
- Scenario: /^the "([^\"]*)" field should( not)? be visible$/ with Javascript
126
- When I go to "/static_pages/visibility"
127
- Then the "Visible field" field should be visible
128
- But the "Hidden field" field should not be visible
129
-
130
-
131
- Scenario: /^I should (not )?see (?:|a|an |the )(.*?) element$/
132
- When I go to "/static_pages/see_element"
133
- Then I should see an element ".panel"
134
- And I should see the element ".panel"
135
- And I should see an element for a panel
136
- And I should see the element for a panel
137
- But I should not see an element ".timeline"
138
- But I should not see the element ".timeline"
139
- And I should not see an element for the timeline
140
- And I should not see the element for the timeline
141
-
142
-
143
- Scenario: /^(.*) within (.*[^:])$/
144
- When I go to "/static_pages/within"
145
- Then I should see an element ".child1" within ".container1"
146
- But I should not see an element ".child1" within ".container2"
147
-
148
-
149
- Scenario: /^(.*) within (.*[^:])$/ with a Capybara::Node::Element
150
- When I go to "/static_pages/within"
151
- Then I should see "All" within the table row containing "Admin"
152
-
153
-
154
- Scenario: the /^(.*) within (.*[^:])$/ step should not be invoked when the word "within" is used in an argument for another step
155
- When I go to "/static_pages/within"
156
- Then I should see "He lives within a few miles of Augsburg"
157
-
158
-
159
- Scenario: /^I perform basic authentication as "([^\"]*)\/([^\"]*)" and go to (.*)$/
160
- When I go to "/authenticated/page"
161
- Then I should see "Access denied"
162
- When I perform basic authentication as "user/password" and go to "/authenticated/page"
163
- Then I should see "Action reached"
164
-
165
-
166
- @javascript
167
- Scenario: /^I perform basic authentication as "([^\"]*)\/([^\"]*)" and go to (.*)$/ with Javascript
168
- When I perform basic authentication as "user/password" and go to "/authenticated/page"
169
- Then I should see "Action reached"