terminus 0.4.0 → 0.5.0

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