spreewald 0.3.2 → 0.3.3
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.
- data/README.md +54 -48
- data/Rakefile +1 -0
- data/lib/spreewald/development_steps.rb +1 -0
- data/lib/spreewald_support/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -28,11 +28,12 @@ Alternatively, you can require everything by doing
|
|
28
28
|
|
29
29
|
require 'spreewald/all_steps'
|
30
30
|
|
31
|
+
|
31
32
|
## Waiting for page load
|
32
33
|
|
33
|
-
Spreewald's web steps are all aware
|
34
|
+
Spreewald's web steps are all aware that you might run them with a Selenium/Capybara webdriver, and wait for the browser to finish loading the page, if necessary.
|
34
35
|
|
35
|
-
This is done
|
36
|
+
This is done by rerunning any assertions until they suceed or a timeout is reached.
|
36
37
|
|
37
38
|
You can achieve this in your own steps by wrapping them inside a `patiently do` block, like
|
38
39
|
|
@@ -44,11 +45,15 @@ You can achieve this in your own steps by wrapping them inside a `patiently do`
|
|
44
45
|
|
45
46
|
More info [here](https://makandracards.com/makandra/12139-waiting-for-page-load-with-spreewald).
|
46
47
|
|
48
|
+
## This README
|
49
|
+
|
50
|
+
The "Steps" section is autogenerated by `rake update_readme` from comments in the step definitions.
|
51
|
+
|
52
|
+
|
47
53
|
## Steps
|
48
54
|
|
49
55
|
### development_steps.rb
|
50
56
|
|
51
|
-
Marks scenario as pending
|
52
57
|
|
53
58
|
* **Then it should work**
|
54
59
|
|
@@ -77,13 +82,13 @@ Marks scenario as pending
|
|
77
82
|
|
78
83
|
* **When I clear my e?mails**
|
79
84
|
|
80
|
-
|
85
|
+
|
81
86
|
|
82
87
|
|
83
88
|
* **Then (an|no) e?mail should have been sent with:**
|
84
89
|
|
85
90
|
Example:
|
86
|
-
|
91
|
+
|
87
92
|
Then an email should have been sent with:
|
88
93
|
"""
|
89
94
|
From: max.mustermann@example.com
|
@@ -92,7 +97,7 @@ Marks scenario as pending
|
|
92
97
|
Body: ...
|
93
98
|
Attachments: ...
|
94
99
|
"""
|
95
|
-
|
100
|
+
|
96
101
|
You can skip lines, of course.
|
97
102
|
|
98
103
|
|
@@ -103,7 +108,7 @@ Marks scenario as pending
|
|
103
108
|
|
104
109
|
* **Then no e?mail should have been sent**
|
105
110
|
|
106
|
-
|
111
|
+
|
107
112
|
|
108
113
|
|
109
114
|
* **Then I should see "..." in the e?mail**
|
@@ -119,9 +124,9 @@ Marks scenario as pending
|
|
119
124
|
* **Then that e?mail should have the following lines in the body:**
|
120
125
|
|
121
126
|
Only works after you've retrieved the email using "Then an email should have been sent with:"
|
122
|
-
|
127
|
+
|
123
128
|
Example:
|
124
|
-
|
129
|
+
|
125
130
|
And that mail should have the following lines in the body:
|
126
131
|
"""
|
127
132
|
All of these lines
|
@@ -144,7 +149,7 @@ See [this article](https://makandracards.com/makandra/763-cucumber-step-to-match
|
|
144
149
|
|
145
150
|
* **Then I should( not)? see a table with the following rows( in any order)?**
|
146
151
|
|
147
|
-
|
152
|
+
|
148
153
|
|
149
154
|
|
150
155
|
|
@@ -157,7 +162,7 @@ See [this article](https://makandracards.com/makandra/1222-useful-cucumber-steps
|
|
157
162
|
* **When the (date|time) is "(\d{4}-\d{2}-\d{2}( \d{1,2}:\d{2})?)"**
|
158
163
|
|
159
164
|
Example:
|
160
|
-
|
165
|
+
|
161
166
|
Given the date is "2012-02-10"
|
162
167
|
Given the time is "2012-02-10 13:40"
|
163
168
|
|
@@ -165,14 +170,14 @@ See [this article](https://makandracards.com/makandra/1222-useful-cucumber-steps
|
|
165
170
|
* **When the time is "(\d{1,2}:\d{2})"**
|
166
171
|
|
167
172
|
Example:
|
168
|
-
|
173
|
+
|
169
174
|
Given the time is "13:40"
|
170
175
|
|
171
176
|
|
172
177
|
* **When it is (\d+|a|some|a few) (seconds?|minutes?|hours?|days?|weeks?|months?|years?) (later|earlier)**
|
173
178
|
|
174
179
|
Example:
|
175
|
-
|
180
|
+
|
176
181
|
When it is 10 minutes later
|
177
182
|
When it is a few hours earlier
|
178
183
|
|
@@ -180,7 +185,7 @@ See [this article](https://makandracards.com/makandra/1222-useful-cucumber-steps
|
|
180
185
|
|
181
186
|
### web_steps.rb
|
182
187
|
|
183
|
-
Most of cucumber-rails' original web steps plus a few of our own.
|
188
|
+
Most of cucumber-rails' original web steps plus a few of our own.
|
184
189
|
|
185
190
|
Note that cucumber-rails deprecated all its steps quite a while ago with the following
|
186
191
|
deprecation notice. Decide for yourself whether you want to use them:
|
@@ -205,30 +210,31 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
205
210
|
|
206
211
|
* **When ... within (.*[^:])**
|
207
212
|
|
208
|
-
You can append 'within [selector]' to any other web step
|
213
|
+
You can append 'within [selector]' to any other web step.
|
214
|
+
|
209
215
|
Example:
|
210
|
-
|
216
|
+
|
211
217
|
Then I should see "some text" within ".page_body"
|
212
218
|
|
213
219
|
|
214
220
|
* **Given I am on ...**
|
215
221
|
|
216
|
-
|
222
|
+
|
217
223
|
|
218
224
|
|
219
225
|
* **When I go to ...**
|
220
226
|
|
221
|
-
|
227
|
+
|
222
228
|
|
223
229
|
|
224
230
|
* **When I press "..."**
|
225
231
|
|
226
|
-
|
232
|
+
|
227
233
|
|
228
234
|
|
229
235
|
* **When I follow "..."**
|
230
236
|
|
231
|
-
|
237
|
+
|
232
238
|
|
233
239
|
|
234
240
|
* **When I fill in "..." (with|for) "..."**
|
@@ -263,31 +269,31 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
263
269
|
|
264
270
|
* **When I attach the file "..." to "..."**
|
265
271
|
|
266
|
-
|
272
|
+
|
267
273
|
|
268
274
|
|
269
275
|
* **Then I should see "..."**
|
270
276
|
|
271
277
|
Checks that some text appears on the page
|
272
|
-
|
278
|
+
|
273
279
|
Note that this does not detect if the text might be hidden via CSS
|
274
280
|
|
275
281
|
|
276
282
|
* **Then I should see \/([^\/]*)\/**
|
277
283
|
|
278
284
|
Checks that a regexp appears on the page
|
279
|
-
|
285
|
+
|
280
286
|
Note that this does not detect if the text might be hidden via CSS
|
281
287
|
|
282
288
|
|
283
289
|
* **Then I should not see "..."**
|
284
290
|
|
285
|
-
|
291
|
+
|
286
292
|
|
287
293
|
|
288
294
|
* **Then I should not see \/([^\/]*)\/**
|
289
295
|
|
290
|
-
|
296
|
+
|
291
297
|
|
292
298
|
|
293
299
|
* **Then the "..." field( within ...)? should contain "..."**
|
@@ -297,7 +303,7 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
297
303
|
|
298
304
|
* **Then the "..." field( within ...)? should not contain "..."**
|
299
305
|
|
300
|
-
|
306
|
+
|
301
307
|
|
302
308
|
|
303
309
|
* **Then the "..." field should have the error "..."**
|
@@ -307,32 +313,32 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
307
313
|
|
308
314
|
* **Then the "..." field should( not)? have an error**
|
309
315
|
|
310
|
-
|
316
|
+
|
311
317
|
|
312
318
|
|
313
319
|
* **Then the "..." field should have no error**
|
314
320
|
|
315
|
-
|
321
|
+
|
316
322
|
|
317
323
|
|
318
324
|
* **Then the radio button "..." should( not)? be (checked|selected)**
|
319
325
|
|
320
|
-
|
326
|
+
|
321
327
|
|
322
328
|
|
323
329
|
* **Then I should be on ...**
|
324
330
|
|
325
|
-
|
331
|
+
|
326
332
|
|
327
333
|
|
328
334
|
* **Then I should have the following query string:**
|
329
335
|
|
330
336
|
Example:
|
331
|
-
|
337
|
+
|
332
338
|
I should have the following query string:
|
333
339
|
| locale | de |
|
334
340
|
| currency_code | EUR |
|
335
|
-
|
341
|
+
|
336
342
|
Succeeds when the URL contains the given "locale" and "currency_code" params
|
337
343
|
|
338
344
|
|
@@ -349,9 +355,9 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
349
355
|
* **Then I should( not)? see the (number|amount) ([\-\d,\.]+)( (.*?))?**
|
350
356
|
|
351
357
|
Better way to test for a number of money amount than a `Then I should see`
|
352
|
-
|
358
|
+
|
353
359
|
Checks that there is unexpected minus sign, decimal places etc.
|
354
|
-
|
360
|
+
|
355
361
|
See [here](https://makandracards.com/makandra/1225-test-that-a-number-or-money-amount-is-shown-with-cucumber) for details
|
356
362
|
|
357
363
|
|
@@ -372,7 +378,7 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
372
378
|
|
373
379
|
* **Then nothing should be selected for "..."?**
|
374
380
|
|
375
|
-
|
381
|
+
|
376
382
|
|
377
383
|
|
378
384
|
* **Then "..." should( not)? be an option for "..."**
|
@@ -392,7 +398,7 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
392
398
|
|
393
399
|
* **Then I should not see "..." in the HTML**
|
394
400
|
|
395
|
-
|
401
|
+
|
396
402
|
|
397
403
|
|
398
404
|
* **Then I should see an error**
|
@@ -402,7 +408,7 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
402
408
|
|
403
409
|
* **When I reload the page**
|
404
410
|
|
405
|
-
|
411
|
+
|
406
412
|
|
407
413
|
|
408
414
|
* **Then "..." should( not)? be visible**
|
@@ -410,7 +416,7 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
410
416
|
Checks that an element is actually visible, also considering styles
|
411
417
|
Within a selenium test, the browser is asked whether the element is really visible
|
412
418
|
In a non-selenium test, we only check for ".hidden", ".invisible" or "style: display:none"
|
413
|
-
|
419
|
+
|
414
420
|
More details [here](https://makandracards.com/makandra/1049-capybara-check-that-a-page-element-is-hidden-via-css)
|
415
421
|
|
416
422
|
|
@@ -422,7 +428,7 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
422
428
|
* **Then I should (not )?see an element "..."**
|
423
429
|
|
424
430
|
Example:
|
425
|
-
|
431
|
+
|
426
432
|
Then I should see an element ".page .container"
|
427
433
|
|
428
434
|
|
@@ -436,44 +442,44 @@ deprecation notice. Decide for yourself whether you want to use them:
|
|
436
442
|
|
437
443
|
Click a link within an element matching the given selector. Will try to be clever
|
438
444
|
and disregard elements that don't contain a matching link.
|
439
|
-
|
445
|
+
|
440
446
|
Example:
|
441
|
-
|
447
|
+
|
442
448
|
When I follow "Read more" inside any ".text_snippet"
|
443
449
|
|
444
450
|
|
445
451
|
|
446
452
|
* **Then I should( not)? see "..." inside any "..."**
|
447
453
|
|
448
|
-
|
454
|
+
|
449
455
|
|
450
456
|
|
451
457
|
* **When I fill in "..." with "..." inside any "..."**
|
452
458
|
|
453
|
-
|
459
|
+
|
454
460
|
|
455
461
|
|
456
462
|
* **When I confirm the browser dialog**
|
457
463
|
|
458
|
-
|
464
|
+
|
459
465
|
|
460
466
|
|
461
467
|
* **When I cancel the browser dialog**
|
462
468
|
|
463
|
-
|
469
|
+
|
464
470
|
|
465
471
|
|
466
472
|
* **When I enter "..." into the browser dialog**
|
467
473
|
|
468
|
-
|
474
|
+
|
469
475
|
|
470
476
|
|
471
477
|
* **Then I should see in this order:?**
|
472
478
|
|
473
479
|
Checks that these strings are rendered in the given order in a single line or in multiple lines
|
474
|
-
|
480
|
+
|
475
481
|
Example:
|
476
|
-
|
482
|
+
|
477
483
|
Then I should see in this order:
|
478
484
|
| Alpha Group |
|
479
485
|
| Augsburg |
|
data/Rakefile
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreewald
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tobias Kraze
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-11-
|
18
|
+
date: 2012-11-21 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|