indirect-webrat 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. data/.document +4 -0
  2. data/.gitignore +21 -0
  3. data/Gemfile +14 -0
  4. data/History.txt +470 -0
  5. data/MIT-LICENSE.txt +19 -0
  6. data/README.rdoc +85 -0
  7. data/Rakefile +143 -0
  8. data/Thorfile +118 -0
  9. data/install.rb +1 -0
  10. data/lib/webrat.rb +18 -0
  11. data/lib/webrat/adapters/mechanize.rb +94 -0
  12. data/lib/webrat/adapters/merb.rb +11 -0
  13. data/lib/webrat/adapters/rack.rb +30 -0
  14. data/lib/webrat/adapters/rails.rb +77 -0
  15. data/lib/webrat/adapters/sinatra.rb +9 -0
  16. data/lib/webrat/core.rb +13 -0
  17. data/lib/webrat/core/configuration.rb +114 -0
  18. data/lib/webrat/core/elements/area.rb +31 -0
  19. data/lib/webrat/core/elements/element.rb +33 -0
  20. data/lib/webrat/core/elements/field.rb +438 -0
  21. data/lib/webrat/core/elements/form.rb +127 -0
  22. data/lib/webrat/core/elements/label.rb +31 -0
  23. data/lib/webrat/core/elements/link.rb +93 -0
  24. data/lib/webrat/core/elements/select_option.rb +48 -0
  25. data/lib/webrat/core/locators.rb +20 -0
  26. data/lib/webrat/core/locators/area_locator.rb +38 -0
  27. data/lib/webrat/core/locators/button_locator.rb +54 -0
  28. data/lib/webrat/core/locators/field_by_id_locator.rb +37 -0
  29. data/lib/webrat/core/locators/field_labeled_locator.rb +56 -0
  30. data/lib/webrat/core/locators/field_locator.rb +25 -0
  31. data/lib/webrat/core/locators/field_named_locator.rb +41 -0
  32. data/lib/webrat/core/locators/form_locator.rb +19 -0
  33. data/lib/webrat/core/locators/label_locator.rb +34 -0
  34. data/lib/webrat/core/locators/link_locator.rb +82 -0
  35. data/lib/webrat/core/locators/locator.rb +20 -0
  36. data/lib/webrat/core/locators/select_option_locator.rb +59 -0
  37. data/lib/webrat/core/logging.rb +23 -0
  38. data/lib/webrat/core/matchers.rb +4 -0
  39. data/lib/webrat/core/matchers/have_content.rb +68 -0
  40. data/lib/webrat/core/matchers/have_selector.rb +85 -0
  41. data/lib/webrat/core/matchers/have_tag.rb +21 -0
  42. data/lib/webrat/core/matchers/have_xpath.rb +124 -0
  43. data/lib/webrat/core/methods.rb +73 -0
  44. data/lib/webrat/core/mime.rb +18 -0
  45. data/lib/webrat/core/save_and_open_page.rb +28 -0
  46. data/lib/webrat/core/scope.rb +362 -0
  47. data/lib/webrat/core/session.rb +318 -0
  48. data/lib/webrat/core/xml.rb +44 -0
  49. data/lib/webrat/core_extensions/blank.rb +58 -0
  50. data/lib/webrat/core_extensions/deprecate.rb +8 -0
  51. data/lib/webrat/core_extensions/detect_mapped.rb +12 -0
  52. data/lib/webrat/core_extensions/meta_class.rb +6 -0
  53. data/lib/webrat/core_extensions/nil_to_query_string.rb +5 -0
  54. data/lib/webrat/core_extensions/tcp_socket.rb +27 -0
  55. data/lib/webrat/integrations/merb.rb +10 -0
  56. data/lib/webrat/integrations/rack.rb +9 -0
  57. data/lib/webrat/integrations/rails.rb +25 -0
  58. data/lib/webrat/integrations/rspec-rails.rb +11 -0
  59. data/lib/webrat/integrations/selenium.rb +11 -0
  60. data/lib/webrat/merb.rb +9 -0
  61. data/lib/webrat/rspec-rails.rb +2 -0
  62. data/lib/webrat/selenium.rb +70 -0
  63. data/lib/webrat/selenium/application_server_factory.rb +43 -0
  64. data/lib/webrat/selenium/application_servers.rb +5 -0
  65. data/lib/webrat/selenium/application_servers/base.rb +46 -0
  66. data/lib/webrat/selenium/application_servers/external.rb +26 -0
  67. data/lib/webrat/selenium/application_servers/merb.rb +50 -0
  68. data/lib/webrat/selenium/application_servers/rack.rb +51 -0
  69. data/lib/webrat/selenium/application_servers/rails.rb +44 -0
  70. data/lib/webrat/selenium/application_servers/sinatra.rb +37 -0
  71. data/lib/webrat/selenium/location_strategy_javascript/button.js +19 -0
  72. data/lib/webrat/selenium/location_strategy_javascript/label.js +48 -0
  73. data/lib/webrat/selenium/location_strategy_javascript/webrat.js +6 -0
  74. data/lib/webrat/selenium/location_strategy_javascript/webratlink.js +32 -0
  75. data/lib/webrat/selenium/location_strategy_javascript/webratlinkwithin.js +15 -0
  76. data/lib/webrat/selenium/location_strategy_javascript/webratselectwithoption.js +5 -0
  77. data/lib/webrat/selenium/matchers.rb +4 -0
  78. data/lib/webrat/selenium/matchers/have_content.rb +78 -0
  79. data/lib/webrat/selenium/matchers/have_selector.rb +57 -0
  80. data/lib/webrat/selenium/matchers/have_tag.rb +72 -0
  81. data/lib/webrat/selenium/matchers/have_xpath.rb +53 -0
  82. data/lib/webrat/selenium/selenium_extensions.js +6 -0
  83. data/lib/webrat/selenium/selenium_rc_server.rb +89 -0
  84. data/lib/webrat/selenium/selenium_session.rb +276 -0
  85. data/lib/webrat/selenium/silence_stream.rb +18 -0
  86. data/spec/fakes/test_adapter.rb +33 -0
  87. data/spec/integration/mechanize/Rakefile +7 -0
  88. data/spec/integration/mechanize/config.ru +2 -0
  89. data/spec/integration/mechanize/sample_app.rb +35 -0
  90. data/spec/integration/mechanize/spec/mechanize_spec.rb +30 -0
  91. data/spec/integration/mechanize/spec/spec_helper.rb +29 -0
  92. data/spec/integration/merb/.gitignore +21 -0
  93. data/spec/integration/merb/Rakefile +35 -0
  94. data/spec/integration/merb/app/controllers/application.rb +2 -0
  95. data/spec/integration/merb/app/controllers/exceptions.rb +13 -0
  96. data/spec/integration/merb/app/controllers/testing.rb +27 -0
  97. data/spec/integration/merb/app/views/exceptions/not_acceptable.html.erb +63 -0
  98. data/spec/integration/merb/app/views/exceptions/not_found.html.erb +47 -0
  99. data/spec/integration/merb/app/views/layout/application.html.erb +12 -0
  100. data/spec/integration/merb/app/views/testing/show_form.html.erb +27 -0
  101. data/spec/integration/merb/app/views/testing/upload.html.erb +9 -0
  102. data/spec/integration/merb/config/environments/development.rb +15 -0
  103. data/spec/integration/merb/config/environments/rake.rb +11 -0
  104. data/spec/integration/merb/config/environments/test.rb +14 -0
  105. data/spec/integration/merb/config/init.rb +25 -0
  106. data/spec/integration/merb/config/rack.rb +11 -0
  107. data/spec/integration/merb/config/router.rb +34 -0
  108. data/spec/integration/merb/spec/spec.opts +1 -0
  109. data/spec/integration/merb/spec/spec_helper.rb +26 -0
  110. data/spec/integration/merb/spec/webrat_spec.rb +39 -0
  111. data/spec/integration/merb/tasks/merb.thor/app_script.rb +31 -0
  112. data/spec/integration/merb/tasks/merb.thor/common.rb +64 -0
  113. data/spec/integration/merb/tasks/merb.thor/gem_ext.rb +124 -0
  114. data/spec/integration/merb/tasks/merb.thor/main.thor +150 -0
  115. data/spec/integration/merb/tasks/merb.thor/ops.rb +93 -0
  116. data/spec/integration/merb/tasks/merb.thor/utils.rb +40 -0
  117. data/spec/integration/rack/Rakefile +5 -0
  118. data/spec/integration/rack/app.rb +89 -0
  119. data/spec/integration/rack/test/helper.rb +20 -0
  120. data/spec/integration/rack/test/webrat_rack_test.rb +74 -0
  121. data/spec/integration/rails/.gitignore +3 -0
  122. data/spec/integration/rails/Rakefile +30 -0
  123. data/spec/integration/rails/app/controllers/application_controller.rb +15 -0
  124. data/spec/integration/rails/app/controllers/buttons_controller.rb +7 -0
  125. data/spec/integration/rails/app/controllers/fields_controller.rb +4 -0
  126. data/spec/integration/rails/app/controllers/links_controller.rb +7 -0
  127. data/spec/integration/rails/app/controllers/webrat_controller.rb +46 -0
  128. data/spec/integration/rails/app/helpers/buttons_helper.rb +2 -0
  129. data/spec/integration/rails/app/helpers/fields_helper.rb +2 -0
  130. data/spec/integration/rails/app/helpers/links_helper.rb +2 -0
  131. data/spec/integration/rails/app/views/buttons/show.html.erb +9 -0
  132. data/spec/integration/rails/app/views/fields/show.html.erb +9 -0
  133. data/spec/integration/rails/app/views/links/show.html.erb +5 -0
  134. data/spec/integration/rails/app/views/webrat/before_redirect_form.html.erb +4 -0
  135. data/spec/integration/rails/app/views/webrat/buttons.html.erb +9 -0
  136. data/spec/integration/rails/app/views/webrat/form.html.erb +28 -0
  137. data/spec/integration/rails/app/views/webrat/within.html.erb +3 -0
  138. data/spec/integration/rails/config/boot.rb +109 -0
  139. data/spec/integration/rails/config/environment.rb +12 -0
  140. data/spec/integration/rails/config/environments/development.rb +17 -0
  141. data/spec/integration/rails/config/environments/selenium.rb +22 -0
  142. data/spec/integration/rails/config/environments/test.rb +22 -0
  143. data/spec/integration/rails/config/initializers/inflections.rb +10 -0
  144. data/spec/integration/rails/config/initializers/mime_types.rb +5 -0
  145. data/spec/integration/rails/config/initializers/new_rails_defaults.rb +17 -0
  146. data/spec/integration/rails/config/locales/en.yml +5 -0
  147. data/spec/integration/rails/config/routes.rb +19 -0
  148. data/spec/integration/rails/public/404.html +30 -0
  149. data/spec/integration/rails/public/422.html +30 -0
  150. data/spec/integration/rails/public/500.html +33 -0
  151. data/spec/integration/rails/script/about +4 -0
  152. data/spec/integration/rails/script/console +3 -0
  153. data/spec/integration/rails/script/dbconsole +3 -0
  154. data/spec/integration/rails/script/destroy +3 -0
  155. data/spec/integration/rails/script/generate +3 -0
  156. data/spec/integration/rails/script/performance/benchmarker +3 -0
  157. data/spec/integration/rails/script/performance/profiler +3 -0
  158. data/spec/integration/rails/script/performance/request +3 -0
  159. data/spec/integration/rails/script/plugin +3 -0
  160. data/spec/integration/rails/script/process/inspector +3 -0
  161. data/spec/integration/rails/script/process/reaper +3 -0
  162. data/spec/integration/rails/script/process/spawner +3 -0
  163. data/spec/integration/rails/script/runner +3 -0
  164. data/spec/integration/rails/script/server +3 -0
  165. data/spec/integration/rails/test/integration/button_click_test.rb +66 -0
  166. data/spec/integration/rails/test/integration/fill_in_test.rb +24 -0
  167. data/spec/integration/rails/test/integration/link_click_test.rb +27 -0
  168. data/spec/integration/rails/test/integration/webrat_test.rb +123 -0
  169. data/spec/integration/rails/test/test_helper.rb +27 -0
  170. data/spec/integration/sinatra/Rakefile +5 -0
  171. data/spec/integration/sinatra/classic_app.rb +63 -0
  172. data/spec/integration/sinatra/modular_app.rb +15 -0
  173. data/spec/integration/sinatra/test/classic_app_test.rb +38 -0
  174. data/spec/integration/sinatra/test/modular_app_test.rb +18 -0
  175. data/spec/integration/sinatra/test/test_helper.rb +16 -0
  176. data/spec/private/core/configuration_spec.rb +87 -0
  177. data/spec/private/core/field_spec.rb +83 -0
  178. data/spec/private/core/form_spec.rb +51 -0
  179. data/spec/private/core/link_spec.rb +24 -0
  180. data/spec/private/core/session_spec.rb +182 -0
  181. data/spec/private/mechanize/mechanize_adapter_spec.rb +96 -0
  182. data/spec/private/nokogiri_spec.rb +77 -0
  183. data/spec/private/rails/attaches_file_spec.rb +114 -0
  184. data/spec/private/rails/rails_adapter_spec.rb +79 -0
  185. data/spec/private/selenium/application_servers/rails_spec.rb +26 -0
  186. data/spec/public/basic_auth_spec.rb +35 -0
  187. data/spec/public/check_spec.rb +191 -0
  188. data/spec/public/choose_spec.rb +118 -0
  189. data/spec/public/click_area_spec.rb +106 -0
  190. data/spec/public/click_button_spec.rb +494 -0
  191. data/spec/public/click_link_spec.rb +544 -0
  192. data/spec/public/fill_in_spec.rb +224 -0
  193. data/spec/public/locators/field_by_xpath_spec.rb +19 -0
  194. data/spec/public/locators/field_labeled_spec.rb +172 -0
  195. data/spec/public/locators/field_with_id_spec.rb +16 -0
  196. data/spec/public/matchers/contain_spec.rb +118 -0
  197. data/spec/public/matchers/have_selector_spec.rb +146 -0
  198. data/spec/public/matchers/have_tag_spec.rb +39 -0
  199. data/spec/public/matchers/have_xpath_spec.rb +165 -0
  200. data/spec/public/reload_spec.rb +10 -0
  201. data/spec/public/save_and_open_spec.rb +49 -0
  202. data/spec/public/select_date_spec.rb +112 -0
  203. data/spec/public/select_datetime_spec.rb +137 -0
  204. data/spec/public/select_spec.rb +474 -0
  205. data/spec/public/select_time_spec.rb +100 -0
  206. data/spec/public/selenium/application_server_factory_spec.rb +49 -0
  207. data/spec/public/selenium/application_servers/external_spec.rb +12 -0
  208. data/spec/public/selenium/selenium_session_spec.rb +37 -0
  209. data/spec/public/set_hidden_field_spec.rb +5 -0
  210. data/spec/public/submit_form_spec.rb +56 -0
  211. data/spec/public/visit_spec.rb +58 -0
  212. data/spec/public/within_spec.rb +177 -0
  213. data/spec/rcov.opts +1 -0
  214. data/spec/spec.opts +2 -0
  215. data/spec/spec_helper.rb +53 -0
  216. data/vendor/selenium-server.jar +0 -0
  217. data/webrat.gemspec +355 -0
  218. metadata +424 -0
@@ -0,0 +1,4 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ History.txt
4
+ MIT-LICENSE.txt
@@ -0,0 +1,21 @@
1
+ coverage
2
+ .DS_Store
3
+ pkg
4
+ doc
5
+ ri
6
+ email.txt
7
+ .svn
8
+ log
9
+ .project
10
+ .loadpath
11
+ *.swp
12
+ results
13
+ test_apps
14
+ *.tmproj
15
+ *.log
16
+ *.pid
17
+ bin
18
+ vendor/gems
19
+ .bundle/
20
+ vendor/bundle/
21
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source :rubygems
2
+ gem "rake", "0.8.7"
3
+ gem "rspec", "1.2.9"
4
+ gem "diff-lcs", "1.1.2"
5
+ gem "rack", "1.0.1"
6
+ gem "nokogiri", "1.4.0"
7
+ gem "merb-core", "1.0.15"
8
+ gem "selenium-client", "1.2.17"
9
+ gem "mechanize", "0.9.3"
10
+ gem "rails", "2.3.4"
11
+ gem "launchy", "2.0.2"
12
+ gem "rack-test", "0.5.2"
13
+ gem "sinatra", "0.9.4"
14
+ gem "mongrel", "1.1.5"
@@ -0,0 +1,470 @@
1
+ == 0.7.4 / 2011-11-19
2
+
3
+ * Minor enhancements
4
+
5
+ * parse XML as XML instead of as HTML
6
+ * handle controller redirects correctly (Daniel Libanori)
7
+ * work with rspec it { should blah } examples (Dmytrii Nagirniak)
8
+ * compatibility with Launchy 2.0 (Jeremy Hinegardner)
9
+ * add follow_redirect! (José Valim)
10
+
11
+ == 0.7.3 / 2011-01-01
12
+
13
+ * Minor enhancements
14
+
15
+ * Use Selenium's eval_css to work with cssQuery and Sizzle (Santiago Suarez Ordoñez)
16
+
17
+ == 0.7.2 / 2010-10-19
18
+
19
+ * TODO: Fill in from git history
20
+
21
+ == 0.7.1 / 2010-04-26
22
+
23
+ * Minor enhancements
24
+
25
+ * Move verbose selenium output that can clutter build output behind setting
26
+ * Added application_port_for_selenium to webrat configuration. The use case is when you want to test through a web server sitting in front of your application server. (Luke Melia)
27
+ * New webrat configuration option selenium_firefox_profile which is passed to selenium server
28
+ * Allow submit_form to select by CSS too (Damian Janowski)
29
+
30
+ * Bug fixes
31
+
32
+ * Fix that current_url wasn't reflecting redirects in Mechanize [#332] (Emrys Ingersoll)
33
+ * Fix attach_file with nested params [#341] (Álvaro Gil)
34
+ * Fix that a 304 was considered a redirect (Larry Marburger)
35
+ * Fix selection of LABEL elements in Selenium mode under IE [#317] (Damian Janowski, Noah Davis)
36
+ * Fix have_xpath not matching negative expectation in the block [#182] (Luismi Cavallé)
37
+
38
+ == 0.7.0 / 2010-01-17
39
+
40
+ * Major enhancements
41
+
42
+ * Upgrade bundled Selenium server JAR to 2.0a1 (Henry Poydar and Jake Scruggs)
43
+
44
+ * Minor enhancements
45
+
46
+ * Save and open page directory specified via configuration, defaults to tmp dir otherwise current dir (Noah Davis)
47
+
48
+ * Bug fixes
49
+
50
+ * Added missing dependency "rack-test" to gemspec (LH #339) (Noah Davis)
51
+ * Removed save_and_open_page's rewriting of static asset paths before saving (was not actually working) (Noah Davis)
52
+ * Make "should contain" ignore extra whitespace when doing string comparisons (Noah Davis)
53
+ * Make selenium matchers handle negative match more consistently with positive match (Luke Melia)
54
+
55
+ == 0.6.0 / 2009-11-28
56
+
57
+ REMOVED: Support for Hpricot + REXML as an alternative to Nokogiri.
58
+
59
+ Hpricot and REXML were difficult to work with, REXML is terribly slow,
60
+ and Nokogiri is recommended even by the author of Hpricot (_why). Now
61
+ that Nokogiri works on JRuby, Webrat is going to use it as its sole
62
+ XML backend.
63
+
64
+ CHANGED: Due to a reorganization, if you're currently requiring "webrat/rspec-rails",
65
+ please change your code to require "webrat/integrations/rspec-rails"
66
+
67
+ * Minor enhancements
68
+
69
+ * Support Rails 2.3.4 JavaScript form authenticity tokens in simulated mode (Jonathan Weiss)
70
+ * When a timeout occurs in wait_for, include the HTML from Selenium in the exception
71
+ * Update the Merb support to be based directly on Rack (Simon Rozet)
72
+ * Support multiple select fields (Kieran P)
73
+ * When locating select options, always match against text, not HTML
74
+
75
+ * Bug fixes
76
+
77
+ * Remove newlines from HTTP Basic authentication credentials (Michael Klett)
78
+ * Require nokogiri form rspec-rails.rb (David Chelimsky)
79
+ * Fix logger issue when running inside Cucumber (Damian Janowski)
80
+ * Fix various issues related to submitting values with HTML entities (Kieran P)
81
+ * Call #to_i on the :count option in matchers (Michael Christenson II)
82
+ * Fix bug where multiline param values were getting truncated
83
+
84
+ == 0.5.3 / 2009-08-27
85
+
86
+ * Minor enhancements
87
+
88
+ * Remove unnecessary requires which are to the wrong paths on Edge Rails
89
+
90
+ == 0.5.1 / 2009-08-18
91
+
92
+ * Minor enhancements
93
+
94
+ * Base Webrat::MIME on Rack::Mime (Simon Rozet)
95
+ * Support file uploads in Rack mode (Simon Rozet)
96
+
97
+ * Bug fixes
98
+
99
+ * Fix bug in Webrat::Methods preventing Selenium mode from working [#277]
100
+
101
+ == 0.5.0 / 2009-08-12
102
+
103
+ * Major enhancements
104
+
105
+ * Depreacate :rack_test and :sinatra in favor of :rack, which uses Rack::Test (Simon Rozet)
106
+
107
+ * Minor enhancements
108
+
109
+ * Don't require rubygems at runtime (Simon Rozet)
110
+
111
+ == 0.4.5 / 2009-08-10
112
+
113
+ * Major enhancements
114
+
115
+ * Ruby 1.9 compatibility (Michael Fellinger, Jakub Kuźma)
116
+ * Improve performance (~2x) on JRuby by supporting Nokogiri
117
+ * Added support for external app servers in selenium mode (basically don't start one) (Mike Gaffney)
118
+ * Added support for uploading files for Merb (Ryan Carver)
119
+
120
+ * Minor enhancements
121
+
122
+ * Upgrade to selenium-client to 1.2.16 (Brian Landau)
123
+ * Upgrade selenium-server.jar to 1.0.1 (Brian Landau)
124
+ * Make redirect detection work in the face of rational maths (like when ruby-units is active) (Piers Cawley)
125
+ * Use Launchy to handle opening pages in the browser with cross-platform compatibility (Bryan Helmkamp)
126
+ * Added support for field_labeled_locators ending in non word characters
127
+ lh 148 (Zach Dennis)
128
+ * Filled in tests on click link lh 195 (diabolo)
129
+ * Added current_url to selenium session lh 215 (Luke Amdor)
130
+ * Added silence spec to selenium lh 238 (Martin Gamsjaeger aka snusnu)
131
+ * Added ability to configure the browser startup timeout for selenium lh 242 (Mike Gaffney, Mark Dodwell)
132
+ * Added delegation for field_named lh194 (pivotal labs)
133
+ * Added fix to keep from escaping field values in mechanize mode lh256 (jish)
134
+ * Adding fixes for click button/link and made the integration specs pass for the same in selenium lh254 (Ldiehl, Matthias Marschall)
135
+ * Adding clicking link by id in selenium mode lh221 (larrytheliquid)
136
+ * Adding fix for have_selector and have_xpath in descendent blocks lh234 (Thomas Jack)
137
+ * Adding fix for fields with labels with special characters (Thomas Jack, Mike Gaffney, Bryan Hemlkamp)
138
+ * Deprecated current_page lh50 (Mike Gaffney)
139
+ * Fixed issue with redirects and multiple hosts lh168 (Mutwin Kraus)
140
+
141
+ * Bug fixes
142
+
143
+ * Wait for application servers socket on 0.0.0.0 instead of the application_address
144
+ * Translate CSS and image paths with single quotes in save_and_open_page (Erin Staniland)
145
+
146
+ == 0.4.4 / 2009-04-06
147
+
148
+ * Major enhancements
149
+
150
+ * Make selenium process management code more robust and informative
151
+
152
+ * Minor enhancements
153
+
154
+ * Add support for Rails javascript post links (Mark Menard)
155
+ * Upgrade selenium-client dependency to 1.2.14, and update for new waiting
156
+ API (Balint Erdi)
157
+ * Change default app environment from "selenium" to "test"
158
+
159
+ * Bug fixes
160
+
161
+ * Don't create a new instance of WWW::Mechanize for each request
162
+ (Mark Menard)
163
+ * Select fields with duplicate selected options sent an incorrect value (Noah Davis)
164
+
165
+ == 0.4.3 / 2009-03-17
166
+
167
+ * Minor enhancements
168
+
169
+ * Support Rails 2.3. Use Rack::Utils to parse params (Matthew Ford)
170
+ * Support for "modular" Sinatra app style (Simon Rozet)
171
+ * Initial Merb and Sinatra compatibility for Selenium mode (Corey Donohoe)
172
+ * When faced with a label with no for attribute, that contains a hidden field
173
+ and another field, as can be the case in Rails 2.3's checkbox view,
174
+ webrat now locates the non-hidden field. (Luke Melia)
175
+ * Add application_framework config for Selenium mode to determine how to
176
+ start and stop the app server (Corey Donohoe)
177
+
178
+ * Bug fixes
179
+
180
+ * Fix following of absolute redirect URL in Sinatra (Simon Rozet)
181
+
182
+ == 0.4.2 / 2009-02-24
183
+
184
+ * Major enhancements
185
+
186
+ * Significant improvements to have_selector. It now supports specifying
187
+ attributes in a hash and :count and :content options. See
188
+ have_selector_spec.rb for more.
189
+ * Add the same functionality mentioned above to have_xpath
190
+
191
+ * Minor enhancements
192
+
193
+ * Squeeze extra whitespace out of failures messages from contain
194
+ matcher
195
+ * Detect infinite redirects and raise a Webrat::InfiniteRedirectError
196
+ (Daniel Lucraft)
197
+
198
+ * Bug fixes
199
+
200
+ * Properly quote single and double quotes strings in XPath
201
+ * Fix warning caused by Nokogiri deprecating CSS::Parser.parse
202
+ (Aaron Patterson)
203
+ * Accept do/end blocks in matchers. [#157] (Peter Jaros)
204
+ * Quote --chdir option to mongrel_rails to support RAILS_ROOTs with spaces
205
+ (T.J. VanSlyke)
206
+
207
+ == 0.4.1 / 2009-01-31
208
+
209
+ * Minor enhancements
210
+
211
+ * Support Sinatra 0.9 (Harry Vangberg)
212
+ * Update query param parsing to work with latest Edge Rails
213
+ * Added #redirected_to method to easily check where an external redirect was
214
+ redirected to (Adam Greene)
215
+ * Recognize input tags with type button (Lena Herrmann)
216
+ * Add uncheck method to Selenium mode (Lee Bankewitz)
217
+
218
+ * Bug fixes
219
+
220
+ * Make requests to a Rails app using a full URL instead of a relative path. This change
221
+ is helpful for Rails apps that use subdomains. (John Hwang and Zach Dennis)
222
+ * Follow redirects that are on the same domain but a different subdomain
223
+ (Adam Greene)
224
+ * rescue from Webrat::TimeoutError in selenium matchers which allows NegativeMatchers
225
+ to behave correctly (Noah Davis)
226
+ * Switch to using selenium.click instead of .check when checking a checkbox
227
+ (Noah Davis)
228
+ * Create tmp/pids directory if directory does not exist. (Amos King and Mike Gaffney)
229
+ * Setup deprecated writers for the selenium_environment= and selenium_port= config
230
+ * Ensure the previous pages params aren't passed through redirect (Daniel Lucraft and
231
+ Bryan Helmkamp)
232
+ * Labels should only search for fields within the current scope (Kyle Hargraves)
233
+
234
+ == 0.4.0 / 2009-01-18
235
+
236
+ * _IMPORTANT_ Breaking change:
237
+
238
+ * Removed init.rb auto-require of webrat/rails
239
+ * Removed auto-require of webrat/rails when requiring webrat when RAILS_ENV is
240
+ defined
241
+
242
+ In your env.rb or test_helper.rb file, ensure you have something like:
243
+
244
+ require "webrat"
245
+
246
+ Webrat.configure do |config|
247
+ config.mode = :rails
248
+ end
249
+
250
+ * Major enhancements
251
+
252
+ * Major improvements to Webrat::Selenium (Many contributors listed here)
253
+ * Add assert_* methods for using Webrat's matchers w/o RSpec (Mike Gaffney, Amos King)
254
+ * Added Webrat.configure method for Webrat configuration [#33] (Mike Gaffney)
255
+ * Added select_time, select_date, and select_datetime to API. [#36] (Ben Mabey)
256
+ * Use Hpricot and REXML when not parsing with Nokogiri (on JRuby, for example)
257
+
258
+ * Minor enhancements
259
+
260
+ * Added Selenium grid configuration and support. (Amos King && Cornel Borcean)
261
+ * Support passing an ActiveRecord model to #within when in Rails mode [#68] (Luke Melia)
262
+ * Make assert_* matchers in rails mode increment the assertions count [#123] (Amos King)
263
+ * Added assert_* matchers to selenium matchers [#110] (Amos King)
264
+ * Added assert_contain, assert_not_contain [#86] (Mike Gaffney, Amos King)
265
+ * Add configuration options for the Selenium environment and port (Kieran Pilkington)
266
+ * Maximize the browser window after initializing Selenium (Luke Melia)
267
+ * Better inspect output for Webrat elements
268
+ * Sets the Webrat mode with Configuration#mode= in the config block [#85] (Mike Gaffney)
269
+ * Detect if the document is XML or HTML using the Content-Type when in Rails mode
270
+ * Expose #selenium method for direct access to Selenium client
271
+ * Check nokogiri gem version before requiring nokogiri
272
+ * Include the Selenium server jar file in the gem (Bryan Helmkamp, Ben Schwarz)
273
+ * Added key_down, key_up and fire_event to Selenium session (Fernando Garcia)
274
+ * Fix outputing README during Rails plugin install (Fernando Garcia)
275
+ * Strip newlines when matching label text (Miha Filej)
276
+ * Add simple support for accessing Webrat's matchers from RSpec by requiring
277
+ "webrat/rspec-rails" (David Chelimsky)
278
+ * Support save_and_open_page in Windows and Cygwin (Mike Gaffney)
279
+ * Added RadioField#checked? to indicated whether or not a radio button is checked
280
+ (Luke Melia)
281
+ * Add spec:jruby rake task for running Webrat's spec suite with JRuby
282
+ * Added field_by_xpath to locate a Webrat::Field using arbitrary XPath expressions
283
+ * Helpful error message for missing option values [#40] (Ben Mabey)
284
+ * Add set_hidden_field method (Noah Davis, Bryan Helmkamp)
285
+ * Add submit_form method for submitting a form by ID (Noah Davis, Bryan Helmkamp)
286
+ * Switch to using Nokogiri.parse for simple XML/XHTML autodetection [#66]
287
+ * Removed Webrat.root method, which seemed to be unused
288
+ * Added automatic starting and stopping of the Selenium server and a Mongrel Rails
289
+ app server when using webrat/selenium
290
+ * Switch to using selenium-client gem and vendor selenium-server.jar (Luke Melia)
291
+ * Added gemspec so the gem builds on GitHub now
292
+ * Deprecate old style methods (fills_in is deprecated in favor of fill_in, etc.)
293
+ * Improvements to the README and RDoc (Bryan Helmkamp, Mike Gaffney)
294
+ * Allow clicking links by id and id regexp (Mike Gaffney)
295
+ * Raise Webrat::DisabledFieldError when attempting to manipulate a disabled field
296
+ * Raise Webrat::NotFoundErrors when an element is not found
297
+ * Raise Webrat::PageLoadError when a failure occurs so that application exceptions
298
+ can be more accurately tested (Ryan Briones)
299
+ * Helpful error message for missing option in select box. [#40] (Ben Mabey)
300
+ * Extracted save_and_open page to make it usable in Selenium mode (Luke Melia)
301
+ * Added save_and_open_screengrab for Selenium mode (Luke Melia)
302
+
303
+ * Bug fixes
304
+
305
+ * field_labeled should disregard labels without matching fields (Kyle Hargraves)
306
+ * Fixed bug where Scope was creating a new DOM rather than re-using the existing DOM.
307
+ [#105] (Zach Dennis)
308
+ * Support Rails > v2.2 by using ActionController::RequestParser for param parsing [#107]
309
+ (Marcello Nuccio)
310
+ * Raise a Webrat::NotFoundError if the scope passed to #within doesn't exist [#90]
311
+ * Match against link _text_ which decodes character references.
312
+ Useful for multibyte languages like Japanese (moronatural@gmail.com)
313
+ * Fix params hash generation for Mechanize when Merb is not defined [#62]
314
+ * Expose some Webrat methods that were missing from the Webrat::Methods module
315
+ (Low Chin Chau)
316
+ * Allow mechanize session to pass through basic auth (Ryan Briones)
317
+ * Improvements to the Mechanize support (Jeremy Burks)
318
+ * Fix following fully qualified local links (Lawrence Pit)
319
+ * Fixed bug where Webrat would lose complex parameters (like foo[bar[baz]][])
320
+ in Merb due to not correctly merging Mashes. (Drew Colthorp)
321
+ * Extend Rails' ActionController::IntegrationTest instead of
322
+ ActionController::Integration::Session (Fixes using Webrat's #select method and
323
+ avoids usage of method_missing)
324
+ * Ensure that Webrat::MechanizeSession.request_page always uses an absolute
325
+ URL. (Graham Ashton)
326
+ * Strip anchor tags from URIs before passing to Rails integration session
327
+ (Noah Davis)
328
+ * Treat text and regexp when matching Selenium buttons (Ross Kaffenberger)
329
+ * Allow SeleniumSession's click_button to be called without an argument without
330
+ blowing up (Luke Melia)
331
+
332
+ == 0.3.4 / 2008-12-29
333
+
334
+ * 1 Minor enhancement
335
+
336
+ * Fix compatibility with Nokogiri 1.1.0 on JRuby
337
+
338
+ * 1 Bug fix
339
+
340
+ * Correct version for Nokogiri dependency in gem
341
+
342
+ == 0.3.3 / 2008-12-28
343
+
344
+ * 1 Minor enhancement
345
+
346
+ * Fix compatibility with Nokogiri 1.1.0 on MRI
347
+
348
+ == 0.3.2 / 2008-11-08
349
+
350
+ * 1 Minor enhancement
351
+
352
+ * Fixes behavior or have_tag when a block is passed. It passes the matched node(s)
353
+ to the block for further specs again. (Carl Lerche)
354
+
355
+ == 0.3.1 / 2008-11-07
356
+
357
+ * 1 Minor enhancement
358
+
359
+ * Use @_webrat_session instance variable instead of @session for Merb integration
360
+ to avoid collisions
361
+
362
+ == 0.3.0 / 2008-11-07
363
+
364
+ * 4 Major enhancements
365
+
366
+ * Added Merb support (Gwyn Morfey, Jeremy Burks, Rob Kaufman, Yehuda Katz)
367
+ * Added experimental Selenium support (Luke Melia)
368
+ * Add have_selector, have_xpath, have_tag and contain matchers from Merb
369
+ * Switch from Hpricot to Nokogiri for XML parsing (thanks, Aaron Patterson)
370
+
371
+ * 37 Minor enhancements
372
+
373
+ * Added #within for manipulating the current page within a selector scope
374
+ * Add support for file fields via #attaches_file method (Rails only at the moment)
375
+ (Kyle Hargraves)
376
+ * Add support for simulating SSL requests (Luke Melia)
377
+ * Added #basic_auth(user, pass) to support HTTP Basic Auth (Aslak Hellesøy)
378
+ * Added support for Sinatra and Rack (Aslak Hellesøy)
379
+ * Rename visits to visit, fills_in to fill_in, etc.
380
+ * Add #field_labeled for looking up form fields by label (David Chelimsky)
381
+ * Add #field_named and #field_with_id locators
382
+ * Don't depend on hoe anymore
383
+ * Return responses after sending requests
384
+ * Allow clicking links and buttons by a regular expression in Selenium (Luke Melia)
385
+ * Allow clicking links by a regular expression
386
+ * Add #http_accept for including MIME type HTTP "Accept" headers (Ryan Briones)
387
+ * Add #header to support inclusion of custom HTTP headers (Ryan Briones)
388
+ * Consider response codes 200-499 as successful enough to not raise a Webrat error
389
+ (David Leal)
390
+ * Add support for clicking areas of an image map (Alex Lang)
391
+ * Support relative links, including href="?foo=bar" (Kyle Hargraves)
392
+ * Separated Rails-specific code from the Webrat core to make it easier to use
393
+ Webrat with other environments
394
+ * Alias visits as visit, clicks_link as click_link, etc. for better readability
395
+ * Raise error when trying to interact with a disabled form element (Luke Melia)
396
+ * Don't send disabled form elements to the server (Nicholas A. Evans)
397
+ * Display response body when the page load is not successful (David Leal)
398
+ * CGI escape form field values (Miha Filej)
399
+ * Add support for redirect_to :back by sending HTTP_REFERER headers
400
+ (Hendrik Volkmer)
401
+ * Expose current DOM (as an Hpricot object) as #current_dom
402
+ * Add support for disabling JavaScript when clicking a link to enable testing of
403
+ both JS and non-JS implementations (Luke Melia and Bryan Helmkamp)
404
+ * Support &nbsp's as spaces in matching link text (Luke Melia)
405
+ * Support button elements (Nick Sieger)
406
+ * Support matching select options by regexp (Kyle Hargraves)
407
+ * save_and_open_page rewrites css and image references to provide a friendlier
408
+ debugging experience (Luke Melia)
409
+ * Added support for matching alt attributes in fields (primarly for clicks_button)
410
+ (Aaron Quint)
411
+ * Support '&' in submitted values (Kyle Hargraves)
412
+ * Support clicking links by title (Dan Barry)
413
+ * Added missing spec for clicking image buttons (Tim Harper)
414
+ * Switched tests to specs, and from Mocha to RSpec's mocking library
415
+ * Add support to click_button for IDs (Gwyn Morfey)
416
+ * Miscellaneous core refactorings (Jan Suchal)
417
+
418
+ * 8 Bug fixes
419
+
420
+ * Fix initialization of WWW::Mechanize (Derek Kastner)
421
+ * Don't open blank pages in the browser (Kyle Hargraves)
422
+ * Support radio buttons with multiple labels (Dan Barry)
423
+ * Fix load order bug on some platforms (Ismael Celis)
424
+ * Fix bug with empty select list option (Kyle Hargraves)
425
+ * Fix regression of not sending default values in password fields
426
+ * Don't explode if encountering inputs with no type attribute (assume text)
427
+ * Fix bug where choosing a radio button in a series with a default submitted the
428
+ incorrect field value (Luke Melia)
429
+
430
+ == 0.2.0 / 2008-04-04
431
+
432
+ * 4 Major enhancements
433
+
434
+ * Add save_and_open_page to aid in debugging
435
+ * Add radio button support via #chooses method
436
+ * Add basic support for Rails-generated JavaScript link tags
437
+ * Add support for checkboxes (Patches from Kyle Hargraves and Jarkko Laine)
438
+ * Add support for textarea fields (Sacha Schlegel)
439
+
440
+ * 8 Minor enhancements
441
+
442
+ * Added reloads method to reload the page (Kamal Fariz Mahyuddi)
443
+ * Prevent making a request if clicking on local anchor link (Kamal Fariz Mahyuddi)
444
+ * Added clicks_link_within(selector, link_text), allowing restricting link search
445
+ to within a given css selector (Luke Melia)
446
+ * Allow specifying the input name/label when doing a select (David Chelimsky)
447
+ * Raise a specific exception if the developer tries to manipulate form elements
448
+ before loading a page (James Deville)
449
+ * Add support for alternate POST, PUT and DELETE link clicking (Kyle Hargraves)
450
+ * Change clicks_link to find the shortest matching link (Luke Melia)
451
+ * Improve matching for labels in potentially ambiguous cases
452
+
453
+ * 7 Bug fixes
454
+
455
+ * Fix incorrect serializing of collection inputs, i.e. name contains []
456
+ (Kamal Fariz Mahyuddi)
457
+ * Serialize empty text field values just like browsers (Kamal Fariz Mahyuddi)
458
+ * Quick fix to avoid @dom not initialized warnings (Kamal Fariz Mahyuddi)
459
+ * Docfix: bad reference to #select method in README (Luke Melia)
460
+ * Ensure Rails-style checkboxes work properly (checkboxes followed by a hidden
461
+ input with the same name)
462
+ * Fix Edge Rails (a.k.a. 2.0 RC) compatibility (David Chelimsky)
463
+ * Support param hashes nested more than one level (David Chelimsky)
464
+
465
+ == 0.1.0 / 2007-11-28
466
+
467
+ * 1 major enhancement
468
+
469
+ * Birthday!
470
+