terminus 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +25 -19
- data/bin/terminus +1 -1
- data/lib/capybara/driver/terminus.rb +28 -17
- data/lib/terminus.rb +29 -15
- data/lib/terminus/application.rb +5 -11
- data/lib/terminus/browser.rb +97 -44
- data/lib/terminus/client.rb +43 -0
- data/lib/terminus/client/browser.rb +30 -0
- data/lib/terminus/client/phantom.js +6 -0
- data/lib/terminus/client/phantomjs.rb +20 -0
- data/lib/terminus/connector.rb +9 -0
- data/lib/terminus/connector/server.rb +142 -0
- data/lib/terminus/connector/socket_handler.rb +72 -0
- data/lib/terminus/controller.rb +22 -5
- data/lib/terminus/host.rb +7 -2
- data/lib/terminus/node.rb +11 -5
- data/lib/terminus/proxy.rb +35 -1
- data/lib/terminus/proxy/driver_body.rb +26 -6
- data/lib/terminus/proxy/external.rb +9 -0
- data/lib/terminus/proxy/rewrite.rb +4 -2
- data/lib/terminus/public/compiled/terminus-min.js +3 -0
- data/lib/terminus/public/compiled/terminus.js +5270 -0
- data/lib/terminus/public/loader.js +1 -1
- data/lib/terminus/public/pathology.js +3174 -0
- data/lib/terminus/public/syn/browsers.js +2 -2
- data/lib/terminus/public/syn/drag/drag.js +3 -4
- data/lib/terminus/public/syn/key.js +130 -111
- data/lib/terminus/public/syn/mouse.js +2 -2
- data/lib/terminus/public/syn/synthetic.js +45 -34
- data/lib/terminus/public/terminus.js +183 -70
- data/lib/terminus/server.rb +6 -0
- data/lib/terminus/timeouts.rb +4 -2
- data/lib/terminus/views/bootstrap.erb +12 -27
- data/lib/terminus/views/index.erb +1 -1
- data/spec/reports/android.txt +875 -0
- data/spec/reports/chrome.txt +137 -8
- data/spec/reports/firefox.txt +137 -9
- data/spec/reports/opera.txt +142 -13
- data/spec/reports/phantomjs.txt +871 -0
- data/spec/reports/safari.txt +137 -8
- data/spec/spec_helper.rb +19 -17
- data/spec/terminus_driver_spec.rb +8 -6
- data/spec/terminus_session_spec.rb +4 -4
- metadata +209 -117
@@ -0,0 +1,871 @@
|
|
1
|
+
|
2
|
+
Capybara::Session
|
3
|
+
with non-existant driver
|
4
|
+
should raise an error
|
5
|
+
|
6
|
+
Capybara::Driver::Terminus
|
7
|
+
it should behave like driver
|
8
|
+
#visit
|
9
|
+
should move to another page
|
10
|
+
should show the correct URL
|
11
|
+
#body
|
12
|
+
should return text reponses
|
13
|
+
should return the full response html
|
14
|
+
encoding of response between ascii and utf8
|
15
|
+
should be valid with html entities
|
16
|
+
should be valid without html entities
|
17
|
+
#find
|
18
|
+
with xpath selector
|
19
|
+
should extract node texts
|
20
|
+
should extract node attributes
|
21
|
+
should extract boolean node attributes
|
22
|
+
should allow retrieval of the value
|
23
|
+
should allow assignment of field value
|
24
|
+
should extract node tag name
|
25
|
+
should extract node visibility
|
26
|
+
should extract node checked state
|
27
|
+
should extract node selected state
|
28
|
+
should return document text on /html selector
|
29
|
+
it should behave like driver with javascript support
|
30
|
+
#find
|
31
|
+
should find dynamically changed nodes
|
32
|
+
#drag_to
|
33
|
+
should drag and drop an object
|
34
|
+
#evaluate_script
|
35
|
+
should return the value of the executed script
|
36
|
+
it should behave like driver with resynchronization support
|
37
|
+
#find
|
38
|
+
with synchronization turned on
|
39
|
+
should wait for all ajax requests to finish
|
40
|
+
with resynchronization turned off
|
41
|
+
should not wait for ajax requests to finish
|
42
|
+
with short synchronization timeout
|
43
|
+
should raise an error
|
44
|
+
it should behave like driver with header support
|
45
|
+
should make headers available through response_headers
|
46
|
+
it should behave like driver with status code support
|
47
|
+
should make the status code available through status_code
|
48
|
+
it should behave like driver with frame support
|
49
|
+
#within_frame
|
50
|
+
should find the div in frameOne
|
51
|
+
should find the div in FrameTwo
|
52
|
+
should find the text div in the main window after finding text in frameOne
|
53
|
+
should find the text div in the main window after finding text in frameTwo
|
54
|
+
it should behave like driver with cookies support
|
55
|
+
#reset!
|
56
|
+
should set and clean cookies
|
57
|
+
it should behave like driver with infinite redirect detection
|
58
|
+
should follow 5 redirects
|
59
|
+
should not follow more than 5 redirects
|
60
|
+
|
61
|
+
Capybara::Session
|
62
|
+
with terminus driver
|
63
|
+
it should behave like session
|
64
|
+
should encode complex field names, like array[][value]
|
65
|
+
#visit
|
66
|
+
should fetch a response from the driver
|
67
|
+
#body
|
68
|
+
should return the unmodified page body
|
69
|
+
#html
|
70
|
+
should return the unmodified page body
|
71
|
+
#source
|
72
|
+
should return the unmodified page source
|
73
|
+
#reset_session!
|
74
|
+
removes cookies
|
75
|
+
resets current host
|
76
|
+
resets current path
|
77
|
+
resets page body
|
78
|
+
it should behave like all
|
79
|
+
#all
|
80
|
+
should find all elements using the given locator
|
81
|
+
should return an empty array when nothing was found
|
82
|
+
should accept an XPath instance
|
83
|
+
with css selectors
|
84
|
+
should find all elements using the given selector
|
85
|
+
should find all elements when given a list of selectors
|
86
|
+
with xpath selectors
|
87
|
+
should find the first element using the given locator
|
88
|
+
with css as default selector
|
89
|
+
should find the first element using the given locator
|
90
|
+
with visible filter
|
91
|
+
should only find visible nodes
|
92
|
+
should only find invisible nodes
|
93
|
+
within a scope
|
94
|
+
should find any element using the given locator
|
95
|
+
it should behave like first
|
96
|
+
#first
|
97
|
+
should find the first element using the given locator
|
98
|
+
should return nil when nothing was found
|
99
|
+
should accept an XPath instance
|
100
|
+
with css selectors
|
101
|
+
should find the first element using the given selector
|
102
|
+
with xpath selectors
|
103
|
+
should find the first element using the given locator
|
104
|
+
with css as default selector
|
105
|
+
should find the first element using the given locator
|
106
|
+
with visible filter
|
107
|
+
should only find visible nodes if true given
|
108
|
+
should include invisible nodes if false given
|
109
|
+
with prefer visible elements
|
110
|
+
should find invisible elements if no visible element exists
|
111
|
+
should prefer visible elements over invisible elements
|
112
|
+
should return the first invisible element if no visible elements exist
|
113
|
+
find visible links normally
|
114
|
+
without prefer visible elements
|
115
|
+
should find invisible elements if no visible element exists
|
116
|
+
should not prefer visible elements over invisible elements
|
117
|
+
within a scope
|
118
|
+
should find the first element using the given locator
|
119
|
+
it should behave like attach_file
|
120
|
+
#attach_file
|
121
|
+
with normal form
|
122
|
+
should set a file path by id (FAILED - 1)
|
123
|
+
should set a file path by label (FAILED - 2)
|
124
|
+
with multipart form
|
125
|
+
should set a file path by id (FAILED - 3)
|
126
|
+
should set a file path by label (FAILED - 4)
|
127
|
+
should not break if no file is submitted
|
128
|
+
should send content type text/plain when uploading a text file (FAILED - 5)
|
129
|
+
should send content type image/jpeg when uploading an image (FAILED - 6)
|
130
|
+
should not break when using HTML5 multiple file input (FAILED - 7)
|
131
|
+
with a locator that doesn't exist
|
132
|
+
should raise an error
|
133
|
+
with a path that doesn't exist
|
134
|
+
should raise an error
|
135
|
+
it should behave like check
|
136
|
+
#check
|
137
|
+
should check a checkbox by id
|
138
|
+
should check a checkbox by label
|
139
|
+
'checked' attribute
|
140
|
+
should be true if checked
|
141
|
+
should be false if unchecked
|
142
|
+
checking
|
143
|
+
should not change an already checked checkbox
|
144
|
+
should check an unchecked checkbox
|
145
|
+
unchecking
|
146
|
+
should not change an already unchecked checkbox
|
147
|
+
should uncheck a checked checkbox
|
148
|
+
with a locator that doesn't exist
|
149
|
+
should raise an error
|
150
|
+
it should behave like choose
|
151
|
+
#choose
|
152
|
+
should choose a radio button by id
|
153
|
+
should choose a radio button by label
|
154
|
+
with a locator that doesn't exist
|
155
|
+
should raise an error
|
156
|
+
it should behave like click_link_or_button
|
157
|
+
#click
|
158
|
+
should click on a link
|
159
|
+
should click on a button
|
160
|
+
should click on a button with no type attribute
|
161
|
+
should be aliased as click_on
|
162
|
+
with a locator that doesn't exist
|
163
|
+
should raise an error
|
164
|
+
it should behave like click_button
|
165
|
+
#click_button
|
166
|
+
should serialize and send valueless buttons that were clicked
|
167
|
+
should not send image buttons that were not clicked
|
168
|
+
should serialize and send GET forms
|
169
|
+
should follow redirects
|
170
|
+
should post pack to the same URL when no action given
|
171
|
+
should post pack to the same URL when blank action given
|
172
|
+
with multiple values with the same name
|
173
|
+
should use the latest given value
|
174
|
+
with a form that has a relative url as an action
|
175
|
+
should post to the correct url
|
176
|
+
with a form that has no action specified
|
177
|
+
should post to the correct url
|
178
|
+
with value given on a submit button
|
179
|
+
on a form with HTML5 fields
|
180
|
+
should serialise and submit search fields
|
181
|
+
should serialise and submit email fields
|
182
|
+
should serialise and submit url fields
|
183
|
+
should serialise and submit tel fields
|
184
|
+
should serialise and submit color fields
|
185
|
+
on an HTML4 form
|
186
|
+
should serialize and submit text fields
|
187
|
+
should escape fields when submitting
|
188
|
+
should serialize and submit password fields
|
189
|
+
should serialize and submit hidden fields
|
190
|
+
should not serialize fields from other forms
|
191
|
+
should submit the button that was clicked, but not other buttons
|
192
|
+
should serialize radio buttons
|
193
|
+
should serialize check boxes
|
194
|
+
should serialize text areas
|
195
|
+
should serialize select tag with values
|
196
|
+
should serialize select tag without values
|
197
|
+
should serialize first option for select tag with no selection
|
198
|
+
should not serialize a select tag without options
|
199
|
+
should not submit disabled fields
|
200
|
+
with id given on a submit button
|
201
|
+
should submit the associated form
|
202
|
+
should work with partial matches
|
203
|
+
with title given on a submit button
|
204
|
+
should submit the associated form
|
205
|
+
should work with partial matches
|
206
|
+
with alt given on an image button
|
207
|
+
should submit the associated form
|
208
|
+
should work with partial matches
|
209
|
+
with value given on an image button
|
210
|
+
should submit the associated form
|
211
|
+
should work with partial matches
|
212
|
+
with id given on an image button
|
213
|
+
should submit the associated form
|
214
|
+
with title given on an image button
|
215
|
+
should submit the associated form
|
216
|
+
should work with partial matches
|
217
|
+
with text given on a button defined by <button> tag
|
218
|
+
should submit the associated form
|
219
|
+
should work with partial matches
|
220
|
+
should prefer exact matches over partial matches
|
221
|
+
with id given on a button defined by <button> tag
|
222
|
+
should submit the associated form
|
223
|
+
should serialize and send GET forms
|
224
|
+
with value given on a button defined by <button> tag
|
225
|
+
should submit the associated form
|
226
|
+
should work with partial matches
|
227
|
+
should prefer exact matches over partial matches
|
228
|
+
with title given on a button defined by <button> tag
|
229
|
+
should submit the associated form
|
230
|
+
should work with partial matches
|
231
|
+
with a locator that doesn't exist
|
232
|
+
should raise an error
|
233
|
+
it should behave like click_link
|
234
|
+
#click_link
|
235
|
+
should follow relative links
|
236
|
+
should follow redirects
|
237
|
+
should follow redirects
|
238
|
+
should add query string to current URL with naked query string
|
239
|
+
should do nothing on anchor links
|
240
|
+
should do nothing on URL+anchor links for the same page
|
241
|
+
should follow link on URL+anchor links for a different page
|
242
|
+
raise an error with links with no href
|
243
|
+
with id given
|
244
|
+
should take user to the linked page
|
245
|
+
with text given
|
246
|
+
should take user to the linked page
|
247
|
+
should accept partial matches
|
248
|
+
should prefer exact matches over partial matches
|
249
|
+
with title given
|
250
|
+
should take user to the linked page
|
251
|
+
should accept partial matches
|
252
|
+
should prefer exact matches over partial matches
|
253
|
+
with alternative text given to a contained image
|
254
|
+
should take user to the linked page
|
255
|
+
should take user to the linked page
|
256
|
+
should prefer exact matches over partial matches
|
257
|
+
with a locator that doesn't exist
|
258
|
+
should raise an error
|
259
|
+
it should behave like fill_in
|
260
|
+
#fill_in
|
261
|
+
should fill in a text field by id
|
262
|
+
should fill in a text field by name
|
263
|
+
should fill in a text field by label without for (FAILED - 8)
|
264
|
+
should fill in a url field by label without for
|
265
|
+
should favour exact label matches over partial matches
|
266
|
+
should fill in a textarea by id
|
267
|
+
should fill in a textarea by label
|
268
|
+
should fill in a textarea by name
|
269
|
+
should fill in a password field by id
|
270
|
+
should fill in a field with a custom type
|
271
|
+
should fill in a field without a type
|
272
|
+
should fill in a text field respecting its maxlength attribute
|
273
|
+
should fill in a password field by name
|
274
|
+
should fill in a password field by label
|
275
|
+
should fill in a password field by name
|
276
|
+
should prefer exact matches over partial matches
|
277
|
+
should throw an exception if a hash containing 'with' is not provided
|
278
|
+
with ignore_hidden_fields
|
279
|
+
should not find a hidden field
|
280
|
+
with a locator that doesn't exist
|
281
|
+
should raise an error
|
282
|
+
it should behave like find_button
|
283
|
+
#find_button
|
284
|
+
should find any field
|
285
|
+
should raise error if the field doesn't exist
|
286
|
+
it should behave like find_field
|
287
|
+
#find_field
|
288
|
+
should find any field
|
289
|
+
should raise error if the field doesn't exist
|
290
|
+
should be aliased as 'field_labeled' for webrat compatibility
|
291
|
+
it should behave like find_link
|
292
|
+
#find_link
|
293
|
+
should find any field
|
294
|
+
should raise error if the field doesn't exist
|
295
|
+
it should behave like find_by_id
|
296
|
+
#find_by_id
|
297
|
+
should find any element by id
|
298
|
+
should raise error if no element with id is found
|
299
|
+
it should behave like find
|
300
|
+
#find
|
301
|
+
should find the first element using the given locator
|
302
|
+
should find the first element using the given locator and options
|
303
|
+
should raise ElementNotFound with specified fail message if nothing was found
|
304
|
+
should raise ElementNotFound with a useful default message if nothing was found
|
305
|
+
should accept an XPath instance and respect the order of paths
|
306
|
+
the returned node
|
307
|
+
should act like a session object
|
308
|
+
should scope CSS selectors
|
309
|
+
should have a reference to its parent if there is one
|
310
|
+
with css selectors
|
311
|
+
should find the first element using the given locator
|
312
|
+
with id selectors
|
313
|
+
should find the first element using the given locator
|
314
|
+
with xpath selectors
|
315
|
+
should find the first element using the given locator
|
316
|
+
with custom selector
|
317
|
+
should use the custom selector
|
318
|
+
with custom selector with :for option
|
319
|
+
should use the selector when it matches the :for option
|
320
|
+
with custom selector with failure_message option
|
321
|
+
should raise an error with the failure message if the element is not found
|
322
|
+
should pass the selector as the second argument
|
323
|
+
with css as default selector
|
324
|
+
should find the first element using the given locator
|
325
|
+
within a scope
|
326
|
+
should find the first element using the given locator
|
327
|
+
it should behave like has_content
|
328
|
+
#has_content?
|
329
|
+
should be true if the given content is on the page at least once
|
330
|
+
should be true if scoped to an element which has the content
|
331
|
+
should be false if scoped to an element which does not have the content
|
332
|
+
should ignore tags
|
333
|
+
should ignore extra whitespace and newlines
|
334
|
+
should be false if the given content is not on the page
|
335
|
+
should handle single quotes in the content
|
336
|
+
should handle double quotes in the content
|
337
|
+
should handle mixed single and double quotes in the content
|
338
|
+
#has_no_content?
|
339
|
+
should be false if the given content is on the page at least once
|
340
|
+
should be false if scoped to an element which has the content
|
341
|
+
should be true if scoped to an element which does not have the content
|
342
|
+
should ignore tags
|
343
|
+
should be true if the given content is not on the page
|
344
|
+
should handle single quotes in the content
|
345
|
+
should handle double quotes in the content
|
346
|
+
should handle mixed single and double quotes in the content
|
347
|
+
it should behave like has_css
|
348
|
+
#has_css?
|
349
|
+
should be true if the given selector is on the page
|
350
|
+
should be false if the given selector is not on the page
|
351
|
+
should respect scopes
|
352
|
+
with between
|
353
|
+
should be true if the content occurs within the range given
|
354
|
+
should be false if the content occurs more or fewer times than range
|
355
|
+
should be false if the content isn't on the page at all
|
356
|
+
with count
|
357
|
+
should be true if the content is on the page the given number of times
|
358
|
+
should be false if the content occurs the given number of times
|
359
|
+
should be false if the content isn't on the page at all
|
360
|
+
should coerce count to an integer
|
361
|
+
with maximum
|
362
|
+
should be true when content occurs same or fewer times than given
|
363
|
+
should be false when content occurs more times than given
|
364
|
+
should be false if the content isn't on the page at all
|
365
|
+
should coerce maximum to an integer
|
366
|
+
with minimum
|
367
|
+
should be true when content occurs same or more times than given
|
368
|
+
should be false when content occurs fewer times than given
|
369
|
+
should be false if the content isn't on the page at all
|
370
|
+
should coerce minimum to an integer
|
371
|
+
with text
|
372
|
+
should discard all matches where the given string is not contained
|
373
|
+
should discard all matches where the given regexp is not matched
|
374
|
+
#has_no_css?
|
375
|
+
should be false if the given selector is on the page
|
376
|
+
should be true if the given selector is not on the page
|
377
|
+
should respect scopes
|
378
|
+
with between
|
379
|
+
should be false if the content occurs within the range given
|
380
|
+
should be true if the content occurs more or fewer times than range
|
381
|
+
should be true if the content isn't on the page at all
|
382
|
+
with count
|
383
|
+
should be false if the content is on the page the given number of times
|
384
|
+
should be true if the content is on the page the given number of times
|
385
|
+
should be true if the content isn't on the page at all
|
386
|
+
should coerce count to an integer
|
387
|
+
with maximum
|
388
|
+
should be false when content occurs same or fewer times than given
|
389
|
+
should be true when content occurs more times than given
|
390
|
+
should be true if the content isn't on the page at all
|
391
|
+
should coerce maximum to an integer
|
392
|
+
with minimum
|
393
|
+
should be false when content occurs more times than given
|
394
|
+
should be true when content occurs fewer times than given
|
395
|
+
should be true if the content isn't on the page at all
|
396
|
+
should coerce minimum to an integer
|
397
|
+
with text
|
398
|
+
should discard all matches where the given string is not contained
|
399
|
+
should discard all matches where the given regexp is not matched
|
400
|
+
it should behave like has_css
|
401
|
+
#has_css?
|
402
|
+
should be true if the given selector is on the page
|
403
|
+
should be false if the given selector is not on the page
|
404
|
+
should respect scopes
|
405
|
+
with between
|
406
|
+
should be true if the content occurs within the range given
|
407
|
+
should be false if the content occurs more or fewer times than range
|
408
|
+
should be false if the content isn't on the page at all
|
409
|
+
with count
|
410
|
+
should be true if the content is on the page the given number of times
|
411
|
+
should be false if the content occurs the given number of times
|
412
|
+
should be false if the content isn't on the page at all
|
413
|
+
should coerce count to an integer
|
414
|
+
with maximum
|
415
|
+
should be true when content occurs same or fewer times than given
|
416
|
+
should be false when content occurs more times than given
|
417
|
+
should be false if the content isn't on the page at all
|
418
|
+
should coerce maximum to an integer
|
419
|
+
with minimum
|
420
|
+
should be true when content occurs same or more times than given
|
421
|
+
should be false when content occurs fewer times than given
|
422
|
+
should be false if the content isn't on the page at all
|
423
|
+
should coerce minimum to an integer
|
424
|
+
with text
|
425
|
+
should discard all matches where the given string is not contained
|
426
|
+
should discard all matches where the given regexp is not matched
|
427
|
+
#has_no_css?
|
428
|
+
should be false if the given selector is on the page
|
429
|
+
should be true if the given selector is not on the page
|
430
|
+
should respect scopes
|
431
|
+
with between
|
432
|
+
should be false if the content occurs within the range given
|
433
|
+
should be true if the content occurs more or fewer times than range
|
434
|
+
should be true if the content isn't on the page at all
|
435
|
+
with count
|
436
|
+
should be false if the content is on the page the given number of times
|
437
|
+
should be true if the content is on the page the given number of times
|
438
|
+
should be true if the content isn't on the page at all
|
439
|
+
should coerce count to an integer
|
440
|
+
with maximum
|
441
|
+
should be false when content occurs same or fewer times than given
|
442
|
+
should be true when content occurs more times than given
|
443
|
+
should be true if the content isn't on the page at all
|
444
|
+
should coerce maximum to an integer
|
445
|
+
with minimum
|
446
|
+
should be false when content occurs more times than given
|
447
|
+
should be true when content occurs fewer times than given
|
448
|
+
should be true if the content isn't on the page at all
|
449
|
+
should coerce minimum to an integer
|
450
|
+
with text
|
451
|
+
should discard all matches where the given string is not contained
|
452
|
+
should discard all matches where the given regexp is not matched
|
453
|
+
it should behave like has_selector
|
454
|
+
#has_selector?
|
455
|
+
should be true if the given selector is on the page
|
456
|
+
should be false if the given selector is not on the page
|
457
|
+
should use default selector
|
458
|
+
should respect scopes
|
459
|
+
with count
|
460
|
+
should be true if the content is on the page the given number of times
|
461
|
+
should be false if the content is on the page the given number of times
|
462
|
+
should be false if the content isn't on the page at all
|
463
|
+
with text
|
464
|
+
should discard all matches where the given string is not contained
|
465
|
+
should discard all matches where the given regexp is not matched
|
466
|
+
#has_no_selector?
|
467
|
+
should be false if the given selector is on the page
|
468
|
+
should be true if the given selector is not on the page
|
469
|
+
should use default selector
|
470
|
+
should respect scopes
|
471
|
+
with count
|
472
|
+
should be false if the content is on the page the given number of times
|
473
|
+
should be true if the content is on the page the wrong number of times
|
474
|
+
should be true if the content isn't on the page at all
|
475
|
+
with text
|
476
|
+
should discard all matches where the given string is contained
|
477
|
+
should discard all matches where the given regexp is matched
|
478
|
+
it should behave like has_xpath
|
479
|
+
#has_xpath?
|
480
|
+
should be true if the given selector is on the page
|
481
|
+
should be false if the given selector is not on the page
|
482
|
+
should use xpath even if default selector is CSS
|
483
|
+
should respect scopes
|
484
|
+
with count
|
485
|
+
should be true if the content is on the page the given number of times
|
486
|
+
should be false if the content is on the page the given number of times
|
487
|
+
should be false if the content isn't on the page at all
|
488
|
+
with text
|
489
|
+
should discard all matches where the given string is not contained
|
490
|
+
should discard all matches where the given regexp is not matched
|
491
|
+
#has_no_xpath?
|
492
|
+
should be false if the given selector is on the page
|
493
|
+
should be true if the given selector is not on the page
|
494
|
+
should use xpath even if default selector is CSS
|
495
|
+
should respect scopes
|
496
|
+
with count
|
497
|
+
should be false if the content is on the page the given number of times
|
498
|
+
should be true if the content is on the page the wrong number of times
|
499
|
+
should be true if the content isn't on the page at all
|
500
|
+
with text
|
501
|
+
should discard all matches where the given string is contained
|
502
|
+
should discard all matches where the given regexp is matched
|
503
|
+
it should behave like has_link
|
504
|
+
#has_link?
|
505
|
+
should be true if the given link is on the page
|
506
|
+
should be false if the given link is not on the page
|
507
|
+
#has_no_link?
|
508
|
+
should be false if the given link is on the page
|
509
|
+
should be true if the given link is not on the page
|
510
|
+
it should behave like has_button
|
511
|
+
#has_button?
|
512
|
+
should be true if the given button is on the page
|
513
|
+
should be false if the given button is not on the page
|
514
|
+
#has_no_button?
|
515
|
+
should be true if the given button is on the page
|
516
|
+
should be false if the given button is not on the page
|
517
|
+
it should behave like has_field
|
518
|
+
#has_field
|
519
|
+
should be true if the field is on the page
|
520
|
+
should be false if the field is not on the page
|
521
|
+
with value
|
522
|
+
should be true if a field with the given value is on the page
|
523
|
+
should be false if the given field is not on the page
|
524
|
+
should be true after the field has been filled in with the given value
|
525
|
+
should be false after the field has been filled in with a different value
|
526
|
+
#has_no_field
|
527
|
+
should be false if the field is on the page
|
528
|
+
should be true if the field is not on the page
|
529
|
+
with value
|
530
|
+
should be false if a field with the given value is on the page
|
531
|
+
should be true if the given field is not on the page
|
532
|
+
should be false after the field has been filled in with the given value
|
533
|
+
should be true after the field has been filled in with a different value
|
534
|
+
#has_checked_field?
|
535
|
+
should be true if a checked field is on the page
|
536
|
+
should be false if an unchecked field is on the page
|
537
|
+
should be false if no field is on the page
|
538
|
+
should be true after an unchecked checkbox is checked
|
539
|
+
should be false after a checked checkbox is unchecked
|
540
|
+
should be true after an unchecked radio button is chosen
|
541
|
+
should be false after another radio button in the group is chosen
|
542
|
+
#has_no_checked_field?
|
543
|
+
should be false if a checked field is on the page
|
544
|
+
should be true if an unchecked field is on the page
|
545
|
+
should be true if no field is on the page
|
546
|
+
#has_unchecked_field?
|
547
|
+
should be false if a checked field is on the page
|
548
|
+
should be true if an unchecked field is on the page
|
549
|
+
should be false if no field is on the page
|
550
|
+
should be false after an unchecked checkbox is checked
|
551
|
+
should be true after a checked checkbox is unchecked
|
552
|
+
should be false after an unchecked radio button is chosen
|
553
|
+
should be true after another radio button in the group is chosen
|
554
|
+
#has_no_unchecked_field?
|
555
|
+
should be true if a checked field is on the page
|
556
|
+
should be false if an unchecked field is on the page
|
557
|
+
should be true if no field is on the page
|
558
|
+
it should behave like has_select
|
559
|
+
#has_select?
|
560
|
+
should be true if the field is on the page
|
561
|
+
should be false if the field is not on the page
|
562
|
+
with selected value
|
563
|
+
should be true if a field with the given value is on the page
|
564
|
+
should be false if the given field is not on the page
|
565
|
+
should be true after the given value is selected
|
566
|
+
should be false after a different value is selected
|
567
|
+
should be true after the given values are selected
|
568
|
+
should be false after one of the values is unselected
|
569
|
+
with options
|
570
|
+
should be true if a field with the given options is on the page
|
571
|
+
should be false if the given field is not on the page
|
572
|
+
#has_no_select?
|
573
|
+
should be false if the field is on the page
|
574
|
+
should be true if the field is not on the page
|
575
|
+
with selected value
|
576
|
+
should be false if a field with the given value is on the page
|
577
|
+
should be true if the given field is not on the page
|
578
|
+
should be false after the given value is selected
|
579
|
+
should be true after a different value is selected
|
580
|
+
should be false after the given values are selected
|
581
|
+
should be true after one of the values is unselected
|
582
|
+
with options
|
583
|
+
should be false if a field with the given options is on the page
|
584
|
+
should be true if the given field is not on the page
|
585
|
+
it should behave like has_table
|
586
|
+
#has_table?
|
587
|
+
should be true if the field is on the page
|
588
|
+
should be false if the field is not on the page
|
589
|
+
with rows
|
590
|
+
should be true if a table with the given rows is on the page
|
591
|
+
should be true if the given rows are incomplete
|
592
|
+
should be false if the given table is not on the page
|
593
|
+
should be false if the given rows contain incorrect elements
|
594
|
+
should be false if the given rows are incorrectly ordered
|
595
|
+
should be false if the only some of the given rows are correct
|
596
|
+
should be false if the given rows are out of order
|
597
|
+
#has_no_table?
|
598
|
+
should be false if the field is on the page
|
599
|
+
should be true if the field is not on the page
|
600
|
+
with rows
|
601
|
+
should be false if a table with the given rows is on the page
|
602
|
+
should be false if the given rows are incomplete
|
603
|
+
should be true if the given table is not on the page
|
604
|
+
should be true if the given rows contain incorrect elements
|
605
|
+
should be true if the given rows are incorrectly ordered
|
606
|
+
should be true if the only some of the given rows are correct
|
607
|
+
should be true if the given rows are out of order
|
608
|
+
it should behave like select
|
609
|
+
#select
|
610
|
+
should return value of the first option
|
611
|
+
should return value of the selected option
|
612
|
+
should return the value attribute rather than content if present
|
613
|
+
should select an option from a select box by id
|
614
|
+
should select an option from a select box by label
|
615
|
+
should select an option without giving a select box
|
616
|
+
should favour exact matches to option labels
|
617
|
+
should escape quotes
|
618
|
+
should obey from
|
619
|
+
show match labels with preceding or trailing whitespace
|
620
|
+
with a locator that doesn't exist
|
621
|
+
should raise an error
|
622
|
+
with an option that doesn't exist
|
623
|
+
should raise an error
|
624
|
+
with multiple select
|
625
|
+
should return an empty value
|
626
|
+
should return value of the selected options
|
627
|
+
should select one option
|
628
|
+
should select multiple options
|
629
|
+
should remain selected if already selected
|
630
|
+
should return value attribute rather than content if present
|
631
|
+
it should behave like text
|
632
|
+
#text
|
633
|
+
should print the text of the page
|
634
|
+
with css as default selector
|
635
|
+
should print the text of the page
|
636
|
+
it should behave like uncheck
|
637
|
+
#uncheck
|
638
|
+
should uncheck a checkbox by id
|
639
|
+
should uncheck a checkbox by label
|
640
|
+
it should behave like unselect
|
641
|
+
#unselect
|
642
|
+
with multiple select
|
643
|
+
should unselect an option from a select box by id
|
644
|
+
should unselect an option without a select box
|
645
|
+
should unselect an option from a select box by label
|
646
|
+
should favour exact matches to option labels
|
647
|
+
should escape quotes
|
648
|
+
with single select
|
649
|
+
should raise an error
|
650
|
+
with a locator that doesn't exist
|
651
|
+
should raise an error
|
652
|
+
with an option that doesn't exist
|
653
|
+
should raise an error
|
654
|
+
it should behave like within
|
655
|
+
#within
|
656
|
+
with CSS selector
|
657
|
+
should click links in the given scope
|
658
|
+
should assert content in the given scope
|
659
|
+
should accept additional options
|
660
|
+
with XPath selector
|
661
|
+
should click links in the given scope
|
662
|
+
with the default selector
|
663
|
+
should use XPath
|
664
|
+
with Node rather than selector
|
665
|
+
should click links in the given scope
|
666
|
+
with the default selector set to CSS
|
667
|
+
should use CSS
|
668
|
+
with click_link
|
669
|
+
should click links in the given scope
|
670
|
+
should raise an error if the scope is not found on the page
|
671
|
+
should restore the scope when an error is raised
|
672
|
+
with nested scopes
|
673
|
+
should respect the inner scope
|
674
|
+
should respect the outer scope
|
675
|
+
with forms
|
676
|
+
should fill in a field and click a button
|
677
|
+
#within_fieldset
|
678
|
+
should restrict scope to a fieldset given by id
|
679
|
+
should restrict scope to a fieldset given by legend
|
680
|
+
#within_table
|
681
|
+
should restrict scope to a fieldset given by id
|
682
|
+
should restrict scope to a fieldset given by legend
|
683
|
+
it should behave like current_url
|
684
|
+
#current_url
|
685
|
+
should return the current url
|
686
|
+
#current_path
|
687
|
+
should show the correct location
|
688
|
+
it should behave like current_host
|
689
|
+
#current_host
|
690
|
+
is affected by visiting a page directly
|
691
|
+
returns to the app host when visiting a relative url
|
692
|
+
is affected by setting Capybara.app_host
|
693
|
+
is unaffected by following a relative link
|
694
|
+
is affected by following an absolute link
|
695
|
+
is unaffected by posting through a relative form
|
696
|
+
is affected by posting through an absolute form
|
697
|
+
is affected by following a redirect
|
698
|
+
it should behave like session with headers support
|
699
|
+
#response_headers
|
700
|
+
should return response headers
|
701
|
+
it should behave like session with javascript support
|
702
|
+
all JS specs
|
703
|
+
Node#drag_to
|
704
|
+
should drag and drop an object
|
705
|
+
Node#reload
|
706
|
+
without automatic reload
|
707
|
+
should reload the current context of the node
|
708
|
+
should reload a parent node
|
709
|
+
should not automatically reload
|
710
|
+
with automatic reload
|
711
|
+
should reload the current context of the node automatically
|
712
|
+
should reload a parent node automatically
|
713
|
+
should reload a node automatically when using find
|
714
|
+
#find
|
715
|
+
should allow triggering of custom JS events
|
716
|
+
#body
|
717
|
+
should return the current state of the page
|
718
|
+
#source
|
719
|
+
should return the original, unmodified source of the page
|
720
|
+
#evaluate_script
|
721
|
+
should evaluate the given script and return whatever it produces
|
722
|
+
#execute_script
|
723
|
+
should execute the given script and return nothing
|
724
|
+
#find
|
725
|
+
should wait for asynchronous load
|
726
|
+
with frozen time
|
727
|
+
raises an error suggesting that Capybara is stuck in time
|
728
|
+
#wait_until
|
729
|
+
should wait for block to return true
|
730
|
+
should raise Capybara::TimeoutError if block doesn't return true within timeout
|
731
|
+
should accept custom timeout in seconds
|
732
|
+
should default to Capybara.default_wait_time before timeout
|
733
|
+
#click_link_or_button
|
734
|
+
should wait for asynchronous load
|
735
|
+
#click_link
|
736
|
+
should wait for asynchronous load
|
737
|
+
#click_button
|
738
|
+
should wait for asynchronous load
|
739
|
+
#fill_in
|
740
|
+
should wait for asynchronous load
|
741
|
+
#check
|
742
|
+
should trigger associated events
|
743
|
+
#has_xpath?
|
744
|
+
should wait for content to appear
|
745
|
+
#has_no_xpath?
|
746
|
+
should wait for content to disappear
|
747
|
+
#has_css?
|
748
|
+
should wait for content to appear
|
749
|
+
#has_no_xpath?
|
750
|
+
should wait for content to disappear
|
751
|
+
#has_content?
|
752
|
+
should wait for content to appear
|
753
|
+
#has_no_content?
|
754
|
+
should wait for content to disappear
|
755
|
+
it should behave like session with status code support
|
756
|
+
#status_code
|
757
|
+
should return response codes
|
758
|
+
|
759
|
+
Failures:
|
760
|
+
|
761
|
+
1) Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with normal form should set a file path by id
|
762
|
+
Failure/Error: @session.attach_file "form_image", __FILE__
|
763
|
+
Capybara::NotSupportedByDriverError:
|
764
|
+
Capybara::NotSupportedByDriverError
|
765
|
+
Shared Example Group: "attach_file" called from ./vendor/capybara/lib/capybara/spec/session.rb:88
|
766
|
+
# ./lib/terminus/node.rb:52:in `set'
|
767
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `block in set'
|
768
|
+
# ./vendor/capybara/lib/capybara/node/base.rb:46:in `wait_until'
|
769
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `set'
|
770
|
+
# ./vendor/capybara/lib/capybara/node/actions.rb:158:in `attach_file'
|
771
|
+
# (eval):2:in `attach_file'
|
772
|
+
# ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:12:in `block (4 levels) in <top (required)>'
|
773
|
+
|
774
|
+
2) Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with normal form should set a file path by label
|
775
|
+
Failure/Error: @session.attach_file "Image", __FILE__
|
776
|
+
Capybara::NotSupportedByDriverError:
|
777
|
+
Capybara::NotSupportedByDriverError
|
778
|
+
Shared Example Group: "attach_file" called from ./vendor/capybara/lib/capybara/spec/session.rb:88
|
779
|
+
# ./lib/terminus/node.rb:52:in `set'
|
780
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `block in set'
|
781
|
+
# ./vendor/capybara/lib/capybara/node/base.rb:46:in `wait_until'
|
782
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `set'
|
783
|
+
# ./vendor/capybara/lib/capybara/node/actions.rb:158:in `attach_file'
|
784
|
+
# (eval):2:in `attach_file'
|
785
|
+
# ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:18:in `block (4 levels) in <top (required)>'
|
786
|
+
|
787
|
+
3) Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should set a file path by id
|
788
|
+
Failure/Error: @session.attach_file "form_document", @test_file_path
|
789
|
+
Capybara::NotSupportedByDriverError:
|
790
|
+
Capybara::NotSupportedByDriverError
|
791
|
+
Shared Example Group: "attach_file" called from ./vendor/capybara/lib/capybara/spec/session.rb:88
|
792
|
+
# ./lib/terminus/node.rb:52:in `set'
|
793
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `block in set'
|
794
|
+
# ./vendor/capybara/lib/capybara/node/base.rb:46:in `wait_until'
|
795
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `set'
|
796
|
+
# ./vendor/capybara/lib/capybara/node/actions.rb:158:in `attach_file'
|
797
|
+
# (eval):2:in `attach_file'
|
798
|
+
# ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:26:in `block (4 levels) in <top (required)>'
|
799
|
+
|
800
|
+
4) Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should set a file path by label
|
801
|
+
Failure/Error: @session.attach_file "Document", @test_file_path
|
802
|
+
Capybara::NotSupportedByDriverError:
|
803
|
+
Capybara::NotSupportedByDriverError
|
804
|
+
Shared Example Group: "attach_file" called from ./vendor/capybara/lib/capybara/spec/session.rb:88
|
805
|
+
# ./lib/terminus/node.rb:52:in `set'
|
806
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `block in set'
|
807
|
+
# ./vendor/capybara/lib/capybara/node/base.rb:46:in `wait_until'
|
808
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `set'
|
809
|
+
# ./vendor/capybara/lib/capybara/node/actions.rb:158:in `attach_file'
|
810
|
+
# (eval):2:in `attach_file'
|
811
|
+
# ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:32:in `block (4 levels) in <top (required)>'
|
812
|
+
|
813
|
+
5) Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should send content type text/plain when uploading a text file
|
814
|
+
Failure/Error: @session.attach_file "Document", @test_file_path
|
815
|
+
Capybara::NotSupportedByDriverError:
|
816
|
+
Capybara::NotSupportedByDriverError
|
817
|
+
Shared Example Group: "attach_file" called from ./vendor/capybara/lib/capybara/spec/session.rb:88
|
818
|
+
# ./lib/terminus/node.rb:52:in `set'
|
819
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `block in set'
|
820
|
+
# ./vendor/capybara/lib/capybara/node/base.rb:46:in `wait_until'
|
821
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `set'
|
822
|
+
# ./vendor/capybara/lib/capybara/node/actions.rb:158:in `attach_file'
|
823
|
+
# (eval):2:in `attach_file'
|
824
|
+
# ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:43:in `block (4 levels) in <top (required)>'
|
825
|
+
|
826
|
+
6) Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should send content type image/jpeg when uploading an image
|
827
|
+
Failure/Error: @session.attach_file "Document", @test_jpg_file_path
|
828
|
+
Capybara::NotSupportedByDriverError:
|
829
|
+
Capybara::NotSupportedByDriverError
|
830
|
+
Shared Example Group: "attach_file" called from ./vendor/capybara/lib/capybara/spec/session.rb:88
|
831
|
+
# ./lib/terminus/node.rb:52:in `set'
|
832
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `block in set'
|
833
|
+
# ./vendor/capybara/lib/capybara/node/base.rb:46:in `wait_until'
|
834
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `set'
|
835
|
+
# ./vendor/capybara/lib/capybara/node/actions.rb:158:in `attach_file'
|
836
|
+
# (eval):2:in `attach_file'
|
837
|
+
# ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:49:in `block (4 levels) in <top (required)>'
|
838
|
+
|
839
|
+
7) Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should not break when using HTML5 multiple file input
|
840
|
+
Failure/Error: @session.attach_file "Multiple Documents", @test_file_path
|
841
|
+
Capybara::NotSupportedByDriverError:
|
842
|
+
Capybara::NotSupportedByDriverError
|
843
|
+
Shared Example Group: "attach_file" called from ./vendor/capybara/lib/capybara/spec/session.rb:88
|
844
|
+
# ./lib/terminus/node.rb:52:in `set'
|
845
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `block in set'
|
846
|
+
# ./vendor/capybara/lib/capybara/node/base.rb:46:in `wait_until'
|
847
|
+
# ./vendor/capybara/lib/capybara/node/element.rb:75:in `set'
|
848
|
+
# ./vendor/capybara/lib/capybara/node/actions.rb:158:in `attach_file'
|
849
|
+
# (eval):2:in `attach_file'
|
850
|
+
# ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:55:in `block (4 levels) in <top (required)>'
|
851
|
+
|
852
|
+
8) Capybara::Session with terminus driver it should behave like session it should behave like fill_in#fill_in should fill in a text field by label without for
|
853
|
+
Failure/Error: extract_results(@session)['street'].should == 'Avenue Q'
|
854
|
+
expected: "Avenue Q"
|
855
|
+
got: "Sesame street 66" (using ==)
|
856
|
+
Shared Example Group: "fill_in" called from ./vendor/capybara/lib/capybara/spec/session.rb:94
|
857
|
+
# ./vendor/capybara/lib/capybara/spec/session/fill_in_spec.rb:22:in `block (3 levels) in <top (required)>'
|
858
|
+
|
859
|
+
Finished in 2 minutes 47.51 seconds
|
860
|
+
506 examples, 8 failures
|
861
|
+
|
862
|
+
Failed examples:
|
863
|
+
|
864
|
+
rspec ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:11 # Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with normal form should set a file path by id
|
865
|
+
rspec ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:17 # Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with normal form should set a file path by label
|
866
|
+
rspec ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:25 # Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should set a file path by id
|
867
|
+
rspec ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:31 # Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should set a file path by label
|
868
|
+
rspec ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:42 # Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should send content type text/plain when uploading a text file
|
869
|
+
rspec ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:48 # Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should send content type image/jpeg when uploading an image
|
870
|
+
rspec ./vendor/capybara/lib/capybara/spec/session/attach_file_spec.rb:54 # Capybara::Session with terminus driver it should behave like session it should behave like attach_file#attach_file with multipart form should not break when using HTML5 multiple file input
|
871
|
+
rspec ./vendor/capybara/lib/capybara/spec/session/fill_in_spec.rb:19 # Capybara::Session with terminus driver it should behave like session it should behave like fill_in#fill_in should fill in a text field by label without for
|