zena 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (245) hide show
  1. data/History.txt +28 -0
  2. data/README.rdoc +6 -6
  3. data/Rakefile +3 -0
  4. data/app/controllers/users_controller.rb +4 -2
  5. data/app/models/acl.rb +6 -0
  6. data/app/models/cached_page.rb +2 -1
  7. data/app/models/document.rb +3 -4
  8. data/app/models/node.rb +8 -5
  9. data/app/models/site.rb +1 -1
  10. data/app/models/template.rb +2 -2
  11. data/app/models/user.rb +5 -3
  12. data/app/views/acls/_add.rhtml +2 -1
  13. data/app/views/acls/_form.rhtml +15 -7
  14. data/app/views/acls/_li.rhtml +2 -0
  15. data/app/views/acls/index.rhtml +3 -1
  16. data/app/views/acls/show.html.erb +1 -1
  17. data/app/views/links/destroy.rjs +16 -2
  18. data/app/views/versions/destroy.rjs +1 -1
  19. data/app/views/zafu/default/Node-admin.zafu +1 -1
  20. data/bin/zena +5 -3
  21. data/bricks/acls/lib/bricks/acls.rb +11 -4
  22. data/bricks/acls/zena/migrate/20110627193757_add_allowed_mode_and_format_to_acl.rb +11 -0
  23. data/bricks/acls/zena/test/integration/acl_integration_test.rb +42 -0
  24. data/bricks/acls/zena/test/sites/erebus/acls.yml +8 -0
  25. data/bricks/mongrel/zena/deploy.rb +19 -0
  26. data/bricks/single/lib/bricks/single.rb +15 -0
  27. data/bricks/single/zena/init.rb +1 -0
  28. data/bricks/sphinx/zena/tasks.rb +1 -1
  29. data/bricks/static/lib/bricks/static.rb +151 -0
  30. data/bricks/static/zena/init.rb +1 -0
  31. data/bricks/static/zena/migrate/20110702010330_add_static_to_idx_templates.rb +12 -0
  32. data/bricks/static/zena/skins/blog/Image-edit.zafu +6 -0
  33. data/bricks/static/zena/skins/blog/Image.zafu +19 -0
  34. data/bricks/static/zena/skins/blog/Node-+index.zafu +1 -0
  35. data/bricks/static/zena/skins/blog/Node-+notFound.zafu +7 -0
  36. data/bricks/static/zena/skins/blog/Node-+search.zafu +19 -0
  37. data/bricks/static/zena/skins/blog/Node.zafu +66 -0
  38. data/bricks/static/zena/skins/blog/Post.zafu +12 -0
  39. data/bricks/static/zena/skins/blog/Project--kml.zafu +30 -0
  40. data/bricks/static/zena/skins/blog/Project.zafu +45 -0
  41. data/bricks/static/zena/skins/blog/comments.zafu +30 -0
  42. data/bricks/static/zena/skins/blog/dict.yml +11 -0
  43. data/bricks/static/zena/skins/blog/img/dateBg.jpg +0 -0
  44. data/bricks/static/zena/skins/blog/img/header.png +0 -0
  45. data/bricks/static/zena/skins/blog/img/mapPin.png +0 -0
  46. data/bricks/static/zena/skins/blog/img/menu.gif +0 -0
  47. data/bricks/static/zena/skins/blog/img/menuover.gif +0 -0
  48. data/bricks/static/zena/skins/blog/img/style.css +110 -0
  49. data/bricks/static/zena/test/integration/static_integration_test.rb +30 -0
  50. data/bricks/static/zena/test/unit/static_test.rb +33 -0
  51. data/bricks/zena/zena/migrate/01_base.rb +1 -2
  52. data/bricks/zena/zena/migrate/20110623072048_fix_cached_path_index.rb +10 -0
  53. data/bricks/zena/zena/migrate/20110710113731_remove_icon_field.rb +18 -0
  54. data/config/bricks.yml +4 -0
  55. data/config/deploy.rb +17 -2
  56. data/config/gems.yml +9 -7
  57. data/config/selenium.yml +38 -0
  58. data/lib/bricks/requirements_validation.rb +8 -2
  59. data/lib/gettext_strings.rb +2 -1
  60. data/lib/tasks/zena.rake +5 -0
  61. data/lib/zena/app.rb +12 -0
  62. data/lib/zena/console.rb +9 -1
  63. data/lib/zena/core_ext/string.rb +7 -2
  64. data/lib/zena/deploy.rb +60 -6
  65. data/lib/zena/deploy/app_init.rhtml +56 -0
  66. data/lib/zena/deploy/haproxy.cnf.rhtml +34 -0
  67. data/lib/zena/deploy/httpd.rhtml +6 -0
  68. data/lib/zena/deploy/start_stop.rhtml +35 -0
  69. data/lib/zena/info.rb +1 -1
  70. data/lib/zena/remote/connection.rb +1 -1
  71. data/lib/zena/site_worker.rb +9 -5
  72. data/lib/zena/use.rb +1 -1
  73. data/lib/zena/use/action.rb +2 -2
  74. data/lib/zena/use/ajax.rb +22 -9
  75. data/lib/zena/use/conditional.rb +5 -0
  76. data/lib/zena/use/context.rb +6 -1
  77. data/lib/zena/use/dates.rb +17 -2
  78. data/lib/zena/use/display.rb +14 -3
  79. data/lib/zena/use/forms.rb +37 -47
  80. data/lib/zena/use/html_tags.rb +3 -0
  81. data/lib/zena/use/node_context.rb +17 -17
  82. data/lib/zena/use/rendering.rb +1 -1
  83. data/lib/zena/use/urls.rb +11 -2
  84. data/lib/zena/use/zafu_attributes.rb +1 -0
  85. data/lib/zena/use/zafu_safe_definitions.rb +16 -1
  86. data/lib/zena/use/zafu_templates.rb +39 -24
  87. data/lib/zena/use/zazen.rb +1 -0
  88. data/locale/de/LC_MESSAGES/zena.mo +0 -0
  89. data/locale/de/zena.po +105 -89
  90. data/locale/en/LC_MESSAGES/zena.mo +0 -0
  91. data/locale/en/zena.mo +0 -0
  92. data/locale/en/zena.po +188 -253
  93. data/locale/fr/LC_MESSAGES/zena.mo +0 -0
  94. data/locale/fr/zena.mo +0 -0
  95. data/locale/fr/zena.po +200 -257
  96. data/locale/zena.pot +95 -85
  97. data/public/javascripts/zena.js +2 -2
  98. data/test/fixtures/files/{Node-test.zafu → TestNode.zafu} +206 -4
  99. data/test/functional/nodes_controller_test.rb +2 -2
  100. data/test/integration/navigation_test.rb +9 -3
  101. data/test/integration/query_node/basic.yml +4 -4
  102. data/test/integration/query_node/filters.yml +2 -2
  103. data/test/integration/zafu_compiler/ajax.yml +6 -6
  104. data/test/integration/zafu_compiler/basic.yml +1 -1
  105. data/test/integration/zafu_compiler/calendar.yml +4 -3
  106. data/test/integration/zafu_compiler/conditional.yml +3 -10
  107. data/test/integration/zafu_compiler/context.yml +1 -1
  108. data/test/integration/zafu_compiler/dates.yml +9 -1
  109. data/test/integration/zafu_compiler/display.yml +7 -1
  110. data/test/integration/zafu_compiler/eval.yml +12 -46
  111. data/test/integration/zafu_compiler/forms.yml +1 -1
  112. data/test/integration/zafu_compiler/query.yml +2 -2
  113. data/test/integration/zafu_compiler/relations.yml +19 -9
  114. data/test/integration/zafu_compiler/roles.yml +12 -0
  115. data/test/integration/zafu_compiler/safe_definitions.yml +1 -1
  116. data/test/integration/zafu_compiler/urls.yml +13 -5
  117. data/test/integration/zafu_compiler/version.yml +6 -0
  118. data/test/integration/zafu_compiler/zafu_attributes.yml +4 -4
  119. data/test/integration/zafu_compiler_test.rb +1 -1
  120. data/test/selenium.readme +8 -0
  121. data/test/selenium/Add/0setup.rsel +12 -0
  122. data/test/selenium/Add/add1.rsel +22 -0
  123. data/test/selenium/Add/add2.rsel +22 -0
  124. data/test/selenium/Add/add3.rsel +22 -0
  125. data/test/selenium/Drop/0setup.rsel +12 -0
  126. data/test/selenium/Drop/drop1.rsel +25 -0
  127. data/test/selenium/Drop/drop2.rsel +25 -0
  128. data/test/selenium/Drop/drop3.rsel +51 -0
  129. data/test/selenium/Drop/drop4.rsel +44 -0
  130. data/test/selenium/Drop/drop5.rsel +16 -0
  131. data/test/selenium/Edit/0setup.rsel +12 -0
  132. data/test/selenium/Edit/edit1.rsel +31 -0
  133. data/test/selenium/Edit/edit2.rsel +39 -0
  134. data/test/selenium/Edit/edit3.rsel +40 -0
  135. data/test/selenium/Form/0setup.rsel +12 -0
  136. data/test/selenium/Form/form1.rsel +9 -0
  137. data/test/selenium/Form/form2.rsel +9 -0
  138. data/test/selenium/Paginate/0setup.rsel +12 -0
  139. data/test/selenium/Paginate/paginate1.rsel +24 -0
  140. data/test/selenium/Toggle/0setup.rsel +12 -0
  141. data/test/selenium/Toggle/toggle1.rsel +21 -0
  142. data/test/sites/zena/nodes.yml +4 -4
  143. data/test/sites/zena/roles.yml +3 -2
  144. data/test/sites/zena/versions.yml +12 -11
  145. data/test/unit/core_ext_test.rb +23 -5
  146. data/test/unit/document_test.rb +6 -2
  147. data/test/unit/node_test.rb +2 -2
  148. data/test/unit/remote_test.rb +1 -2
  149. data/test/unit/role_test.rb +2 -2
  150. data/test/unit/user_test.rb +48 -1
  151. data/test/unit/virtual_class_test.rb +7 -7
  152. data/test/unit/zena/acts/secure_test.rb +1 -1
  153. data/test/unit/zena/use/rendering_test.rb +1 -1
  154. data/test/unit/zena/use/urls_test.rb +3 -3
  155. data/zena.gemspec +65 -101
  156. metadata +67 -103
  157. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run 2.tmCommand +0 -24
  158. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Context.tmCommand +0 -58
  159. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Focused Should.tmCommand +0 -88
  160. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run.tmCommand +0 -27
  161. data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/YAML to Shoulda.tmCommand +0 -23
  162. data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Context.tmPreferences +0 -19
  163. data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Should.tmPreferences +0 -19
  164. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory attributes for.tmSnippet +0 -16
  165. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory build.tmSnippet +0 -16
  166. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory.tmSnippet +0 -16
  167. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define with class.tmSnippet +0 -18
  168. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define.tmSnippet +0 -18
  169. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_next.tmSnippet +0 -16
  170. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_sequence.tmSnippet +0 -18
  171. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_bad_value.tmSnippet +0 -16
  172. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_contains.tmSnippet +0 -16
  173. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_does_not_contain.tmSnippet +0 -16
  174. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_good_value.tmSnippet +0 -16
  175. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_same_elements.tmSnippet +0 -16
  176. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_save.tmSnippet +0 -16
  177. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_sent_email.tmSnippet +0 -18
  178. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_valid.tmSnippet +0 -16
  179. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/association.tmSnippet +0 -17
  180. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/attribute.tmSnippet +0 -17
  181. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/before_should block.tmSnippet +0 -18
  182. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block get.tmSnippet +0 -22
  183. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block post.tmSnippet +0 -23
  184. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block with setup.tmSnippet +0 -25
  185. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/setup.tmSnippet +0 -18
  186. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block with before proc.tmSnippet +0 -18
  187. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block.tmSnippet +0 -18
  188. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_allow_values_for.tmSnippet +0 -16
  189. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_assign_to.tmSnippet +0 -16
  190. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful denied.tmSnippet +0 -20
  191. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful.tmSnippet +0 -20
  192. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_belong_to.tmSnippet +0 -16
  193. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change by.tmSnippet +0 -16
  194. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change from to.tmSnippet +0 -16
  195. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_at_least.tmSnippet +0 -16
  196. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_in_range.tmSnippet +0 -16
  197. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_is.tmSnippet +0 -16
  198. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_value_in_range.tmSnippet +0 -16
  199. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_eventually.tmSnippet +0 -18
  200. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_filter_params.tmSnippet +0 -16
  201. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_and_belong_to_many.tmSnippet +0 -16
  202. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_class_methods.tmSnippet +0 -16
  203. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_column.tmSnippet +0 -16
  204. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_columns.tmSnippet +0 -16
  205. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_index.tmSnippet +0 -16
  206. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_indices.tmSnippet +0 -16
  207. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_instance_methods.tmSnippet +0 -16
  208. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_many.tmSnippet +0 -16
  209. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_named_scope.tmSnippet +0 -16
  210. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_one.tmSnippet +0 -16
  211. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_readonly_attributes.tmSnippet +0 -16
  212. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_mass_assignment_of.tmSnippet +0 -16
  213. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_values_for.tmSnippet +0 -16
  214. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_assign_to.tmSnippet +0 -16
  215. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_change.tmSnippet +0 -16
  216. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_set_the_flash.tmSnippet +0 -16
  217. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_redirect_to.tmSnippet +0 -16
  218. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_a_form.tmSnippet +0 -16
  219. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_template.tmSnippet +0 -16
  220. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_with_layout.tmSnippet +0 -16
  221. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_without_layout.tmSnippet +0 -16
  222. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with.tmSnippet +0 -16
  223. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with_content_type.tmSnippet +0 -16
  224. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_return_from_session.tmSnippet +0 -16
  225. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_route.tmSnippet +0 -16
  226. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_set_the_flash_to.tmSnippet +0 -16
  227. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_acceptance_of.tmSnippet +0 -16
  228. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_numericality_of.tmSnippet +0 -16
  229. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_presence_of.tmSnippet +0 -16
  230. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of with scope.tmSnippet +0 -16
  231. data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of.tmSnippet +0 -16
  232. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
  233. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/run_script.rb +0 -104
  234. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
  235. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/test.rb +0 -17
  236. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/todo.txt +0 -13
  237. data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/bin/yaml_to_shoulda.rb +0 -25
  238. data/vendor/TextMate/Ruby Shoulda.tmbundle/Syntaxes/Ruby on Rails (Shoulda).tmLanguage +0 -166
  239. data/vendor/TextMate/Ruby Shoulda.tmbundle/info.plist +0 -304
  240. data/vendor/TextMate/Zena.tmbundle/Commands/Run all yaml tests.tmCommand +0 -37
  241. data/vendor/TextMate/Zena.tmbundle/Commands/Run focused yaml test.tmCommand +0 -52
  242. data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
  243. data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/run_script.rb +0 -118
  244. data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
  245. data/vendor/TextMate/Zena.tmbundle/info.plist +0 -17
@@ -0,0 +1,12 @@
1
+ # See also the RDoc for SeleniumOnRails::TestBuilder.
2
+ # View result in browser: http://test.host:3000/selenium
3
+
4
+ setup :fixtures => :all
5
+
6
+ # Setup code
7
+ open '/login'
8
+ type 'user_login', 'lion'
9
+ type 'password', 'lion'
10
+ click_and_wait 'commit'
11
+ click_and_wait 'link=Kill the bugs'
12
+ verify_text '_title37', 'Kill the bugs'
@@ -0,0 +1,25 @@
1
+ open "/oo/testnode37.html?test=drop1"
2
+ assert_element_not_present 'drop121_33'
3
+
4
+ # Drag & Drop
5
+ set_timeout 4000
6
+ drag_and_drop_to_object "css=#drag_33 > span.drag_handle", "css=#drop12"
7
+ wait_for_element_present "drop121_33"
8
+ verify_text "drop121_33", "Art"
9
+ # Unlink
10
+ click "css=img[alt=remove]"
11
+ wait_for_element_not_present "drop121_33"
12
+
13
+ # Restart
14
+
15
+ # Drag & Drop
16
+ drag_and_drop_to_object "css=#drag_33 > span.drag_handle", "css=#drop12"
17
+ wait_for_element_present "drop121_33"
18
+ verify_text "drop121_33", "Art"
19
+
20
+ # Make sure the changes are commited to db
21
+ open "/oo/testnode37.html?test=drop1"
22
+ assert_element_present 'drop121_33'
23
+ # Unlink
24
+ click "css=img[alt=remove]"
25
+ wait_for_element_not_present "drop121_33"
@@ -0,0 +1,25 @@
1
+ open "/oo/testnode37.html?test=drop2"
2
+ assert_element_not_present 'drop221_33'
3
+
4
+ # Drag & Drop
5
+ set_timeout 4000
6
+ drag_and_drop_to_object "css=#drag1_33 > span.drag_handle", "drop22_29"
7
+ wait_for_element_present "drop221_29_33"
8
+ verify_text "drop221_29_33", "Art"
9
+ # Unlink
10
+ click "css=#drop221_29_33 img[alt=remove]"
11
+ wait_for_element_not_present "drop221_29_33"
12
+
13
+ # Drag in other target
14
+
15
+ # Drag & Drop
16
+ drag_and_drop_to_object "css=#drag1_33 > span.drag_handle", "drop22_21"
17
+ wait_for_element_present "drop221_21_33"
18
+ verify_text "drop221_21_33", "Art"
19
+
20
+ # Make sure the changes are commited to db
21
+ open "/oo/testnode37.html?test=drop2"
22
+ assert_element_present 'drop221_21_33'
23
+ # Unlink
24
+ click "css=#drop221_21_33 img[alt=remove]"
25
+ wait_for_element_not_present "drop221_21_33"
@@ -0,0 +1,51 @@
1
+ # Drag from list in each.
2
+ =begin
3
+ open "/oo/testnode37.html?test=drop3"
4
+ assert_element_not_present 'drop321_33'
5
+
6
+ # Drag & Drop
7
+ set_timeout 4000
8
+ drag_and_drop_to_object "css=#drag3_33 > span.drag_handle", "drop43"
9
+ wait_for_element_present "drop431_33"
10
+ verify_text "drop431_33", "Art"
11
+ # Unlink
12
+ click "css=img[alt=remove]"
13
+ wait_for_element_not_present "drop431_33"
14
+
15
+ # Restart
16
+
17
+ # Drag & Drop
18
+ drag_and_drop_to_object "css=#drag4_33 > span.drag_handle", "css=#drop43"
19
+ wait_for_element_present "drop431_33"
20
+ verify_text "drop431_33", "Art"
21
+
22
+ # Drag & Drop from other location
23
+ drag_and_drop_to_object "css=#drag3_29 > span.drag_handle", "css=#drop43"
24
+ # nothing happens
25
+ wait_for_element_present "drop431_29"
26
+ verify_text "drop431_29", "a wiki with Zena"
27
+
28
+ # Make sure the changes are commited to db
29
+ open "/oo/testnode37.html?test=drop3"
30
+ assert_element_present 'drop431_33'
31
+ assert_element_present 'drop431_29'
32
+ # Unlink
33
+ click "css=#drop431_29 img[alt=remove]"
34
+ wait_for_element_not_present "drop431_29"
35
+ click "css=#drop431_33 img[alt=remove]"
36
+ wait_for_element_not_present "drop431_33"
37
+
38
+ <div class='test' id='drop3' do='selenium'>
39
+ <h3>drop3</h3>
40
+ <p>Drag from list in each loop.</p>
41
+ <r:projects in='site' do='each'>
42
+ <ul class='box' do='pages'>
43
+ <li class='#{id}' do='each' draggable='true' do='title'/>
44
+ </ul>
45
+ </r:projects>
46
+
47
+ <ul do='drop' set='reference' change='receiver' do='references'>
48
+ <li class='#{id}' do='each'><r:unlink/> <r:title/></li>
49
+ </ul>
50
+ </div>
51
+ =end
@@ -0,0 +1,44 @@
1
+ =begin
2
+ open "/oo/testnode37.html?test=drop1"
3
+ assert_element_not_present 'drop121_33'
4
+
5
+ # Drag & Drop
6
+ set_timeout 4000
7
+ drag_and_drop_to_object "css=#drag_33 > span.drag_handle", "css=#drop12"
8
+ wait_for_element_present "drop121_33"
9
+ verify_text "drop121_33", "Art"
10
+ # Unlink
11
+ click "css=img[alt=remove]"
12
+ wait_for_element_not_present "drop121_33"
13
+
14
+ # Restart
15
+
16
+ # Drag & Drop
17
+ drag_and_drop_to_object "css=#drag_33 > span.drag_handle", "css=#drop12"
18
+ wait_for_element_present "drop121_33"
19
+ verify_text "drop121_33", "Art"
20
+
21
+ # Make sure the changes are commited to db
22
+ open "/oo/testnode37.html?test=drop1"
23
+ assert_element_present 'drop121_33'
24
+ # Unlink
25
+ click "css=img[alt=remove]"
26
+ wait_for_element_not_present "drop121_33"
27
+
28
+ <div class='test' id='drop4' do='selenium'>
29
+ <h3>drop4</h3>
30
+ <p>Drag duplicate elements in source.</p>
31
+
32
+ <ul class='box' do='pages in project limit 3'>
33
+ <li class='#{id}' do='each' draggable='true' do='title'/>
34
+ </ul>
35
+
36
+ <ul class='box' do='pages in project limit 3'>
37
+ <li class='#{id}' do='each' draggable='true' do='title'/>
38
+ </ul>
39
+
40
+ <ul do='drop' set='reference' change='receiver' do='references'>
41
+ <li class='#{id}' do='each'><r:unlink/> <r:title/></li>
42
+ </ul>
43
+ </div>
44
+ =end
@@ -0,0 +1,16 @@
1
+ =begin
2
+ <div class='test' id='drop5' do='selenium'>
3
+ <h3>drop5</h3>
4
+ <p>Drag from drop loop.</p>
5
+
6
+ <ul class='box' do='pages in project limit 3'>
7
+ <li class='#{id}' do='each' draggable='true' do='title'/>
8
+ </ul>
9
+
10
+ <r:projects in='site' do='each'>
11
+ <ul class='box drop_#{id}' do='drop' set='reference' change='receiver' do='references'>
12
+ <li class='#{id}' do='each' draggable='true'><r:unlink/> <r:title/></li>
13
+ </ul>
14
+ </r:projects>
15
+ </div>
16
+ =end
@@ -0,0 +1,12 @@
1
+ # See also the RDoc for SeleniumOnRails::TestBuilder.
2
+ # View result in browser: http://test.host:3000/selenium
3
+
4
+ setup :fixtures => :all
5
+
6
+ # Setup code
7
+ open '/login'
8
+ type 'user_login', 'lion'
9
+ type 'password', 'lion'
10
+ click_and_wait 'commit'
11
+ click_and_wait 'link=Kill the bugs'
12
+ verify_text '_title37', 'Kill the bugs'
@@ -0,0 +1,31 @@
1
+ open '/oo/testnode37.html?test=edit1'
2
+ assert_element_not_present 'edit11_title'
3
+ verify_text "css=#edit11 li.title", "Kill the bugs"
4
+
5
+ # edit
6
+ click 'link=edit'
7
+ wait_for_element_present 'edit11_title'
8
+ type 'edit11_title', 'Kill the bugs ok'
9
+
10
+ # submit
11
+ click 'css=input[type=submit]'
12
+ wait_for_element_not_present 'edit11_title'
13
+ verify_text "css=#edit11 li.title", "Kill the bugs ok"
14
+
15
+ # edit again
16
+ click 'link=edit'
17
+ wait_for_element_present 'edit11_title'
18
+
19
+ # cancel
20
+ click 'css=img[alt="cancel"]'
21
+ wait_for_element_not_present 'edit11_title'
22
+
23
+ # edit again
24
+ click 'link=edit'
25
+ wait_for_element_present 'edit11_title'
26
+ type 'edit11_title', 'Kill the bugs'
27
+
28
+ # submit
29
+ click 'css=input[type=submit]'
30
+ wait_for_element_not_present 'edit11_title'
31
+ verify_text "css=#edit11 li.title", "Kill the bugs"
@@ -0,0 +1,39 @@
1
+ @old_title = 'Kill the bugs'
2
+ @new_title = 'New Ajax page'
3
+
4
+ open '/oo/testnode37.html?test=edit2'
5
+ assert_element_not_present 'edit21_title'
6
+ verify_text "css=#edit21 li.title", @old_title
7
+
8
+ # edit (does not click on 'v_status' checkbox)
9
+ click 'link=edit'
10
+ wait_for_element_present 'edit21_title'
11
+ type 'edit21_title', @new_title
12
+
13
+ # submit
14
+ click 'css=input[type=submit]'
15
+ wait_for_element_not_present 'edit21_title'
16
+ verify_text "css=#edit21 li.title", @new_title
17
+
18
+ # edit again (click on 'v_status' checkbox)
19
+ click 'link=edit'
20
+ wait_for_element_present 'edit21_title'
21
+
22
+ # cancel
23
+ click 'css=img[alt="cancel"]'
24
+ wait_for_element_not_present 'edit21_title'
25
+
26
+ # edit again
27
+ click 'link=edit'
28
+ wait_for_element_present 'edit21_title'
29
+ type 'edit21_title', @old_title
30
+ click 'css=#edit2 input[type=checkbox]'
31
+
32
+ # submit
33
+ click 'css=input[type=submit]'
34
+ wait_for_element_not_present 'edit21_title'
35
+ verify_text "css=#edit21 li.title", @old_title
36
+
37
+ # ensure page is published
38
+ open '/oo/testnode37.html?test=edit2'
39
+ verify_text "css=#title .s50 #_title37", @old_title
@@ -0,0 +1,40 @@
1
+ @old_title = 'Kill the bugs'
2
+ @new_title = 'New Ajax page'
3
+
4
+ open '/oo/testnode37.html?test=edit3'
5
+ assert_element_not_present 'edit31_title'
6
+ verify_text "css=#edit31 td.title", @old_title
7
+
8
+ # edit (does not click on 'v_status' checkbox)
9
+ click 'link=edit'
10
+ wait_for_element_present 'edit31_title'
11
+ type 'edit31_title', @new_title
12
+
13
+ # submit
14
+ click 'css=input[type=submit]'
15
+ wait_for_element_not_present 'edit31_title'
16
+ verify_text "css=#edit31 td.title", @new_title
17
+
18
+ # edit again
19
+ click 'link=edit'
20
+ wait_for_element_present 'edit31_title'
21
+
22
+ # cancel
23
+ click 'css=img[alt="cancel"]'
24
+ wait_for_element_not_present 'edit31_title'
25
+
26
+ # edit again
27
+ click 'link=edit'
28
+ wait_for_element_present 'edit31_title'
29
+ # Ensure we do proper ajax replacements
30
+ assert_element_not_present 'css=#edit3 form form'
31
+ type 'edit31_title', @old_title
32
+
33
+ # submit
34
+ click 'css=input[type=submit]'
35
+ wait_for_element_not_present 'edit31_title'
36
+ verify_text "css=#edit31 td.title", @old_title
37
+
38
+ # ensure changes are recorded
39
+ open '/oo/testnode37.html?test=edit3'
40
+ verify_text "css=#title .s70 #_title37", @old_title
@@ -0,0 +1,12 @@
1
+ # See also the RDoc for SeleniumOnRails::TestBuilder.
2
+ # View result in browser: http://test.host:3000/selenium
3
+
4
+ setup :fixtures => :all
5
+
6
+ # Setup code
7
+ open '/login'
8
+ type 'user_login', 'lion'
9
+ type 'password', 'lion'
10
+ click_and_wait 'commit'
11
+ click_and_wait 'link=Kill the bugs'
12
+ verify_text '_title37', 'Kill the bugs'
@@ -0,0 +1,9 @@
1
+ @test_page = "/oo/testnode37.html?test=form1"
2
+ open @test_page
3
+ type "paginate1_tbl_title", "Hello World!"
4
+ # submit
5
+ click_and_wait 'css=input[type=submit]'
6
+ # Redirected to new page
7
+ assert_not_location "http://test.host:3000#{@test_page}"
8
+ # Parameter on [form] properly passed
9
+ verify_text "css=#title .s50", "Hello World!"
@@ -0,0 +1,9 @@
1
+ open "/oo/testnode37.html?test=form2"
2
+ type "paginate1_tbl_title", "Heal the bugs!"
3
+ # submit
4
+ click_and_wait 'css=input[type=submit]'
5
+
6
+ # Redirected to same page
7
+ assert_location "http://test.host:3000/oo/testnode37.html"
8
+ # Parameter on [form] properly passed
9
+ verify_text "css=#title .s50", "Heal the bugs!"
@@ -0,0 +1,12 @@
1
+ # See also the RDoc for SeleniumOnRails::TestBuilder.
2
+ # View result in browser: http://test.host:3000/selenium
3
+
4
+ setup :fixtures => :all
5
+
6
+ # Setup code
7
+ open '/login'
8
+ type 'user_login', 'lion'
9
+ type 'password', 'lion'
10
+ click_and_wait 'commit'
11
+ click_and_wait 'link=Kill the bugs'
12
+ verify_text '_title37', 'Kill the bugs'
@@ -0,0 +1,24 @@
1
+ @one = {:zip => 29, :title => 'a wiki with Zena'}
2
+ @two = {:zip => 30, :title => 'bird'}
3
+
4
+ open "/oo/testnode37.html?test=paginate1"
5
+ # We are on the first page
6
+ verify_not_text "css=#paginate1_tbl td a", "1"
7
+ assert_element_present "css=#paginate1_tbl #node#{@one[:zip]}"
8
+ assert_element_not_present "css=#paginate1_tbl #node#{@two[:zip]}"
9
+ verify_text "//table[@id='paginate1_tbl']/tbody/tr[3]/td[2]", @one[:title]
10
+
11
+ # Ajax load second page
12
+ click "link=2"
13
+ wait_for_element_present "css=#paginate1_tbl #node#{@two[:zip]}"
14
+ assert_element_not_present "css=#paginate1_tbl #node#{@one[:zip]}"
15
+ verify_text "css=#paginate1_tbl td a", "1"
16
+ verify_text "//table[@id='paginate1_tbl']/tbody/tr[3]/td[2]", @two[:title]
17
+
18
+
19
+ # Manually load second page
20
+ open "/oo/testnode37.html?test=paginate1&p=2"
21
+ assert_element_present "css=#paginate1_tbl #node#{@two[:zip]}"
22
+ assert_element_not_present "css=#paginate1_tbl #node#{@one[:zip]}"
23
+ verify_text "css=#paginate1_tbl td a", "1"
24
+ verify_text "//table[@id='paginate1_tbl']/tbody/tr[3]/td[2]", @two[:title]
@@ -0,0 +1,12 @@
1
+ # See also the RDoc for SeleniumOnRails::TestBuilder.
2
+ # View result in browser: http://test.host:3000/selenium
3
+
4
+ setup :fixtures => :all
5
+
6
+ # Setup code
7
+ open '/login'
8
+ type 'user_login', 'lion'
9
+ type 'password', 'lion'
10
+ click_and_wait 'commit'
11
+ click_and_wait 'link=Kill the bugs'
12
+ verify_text '_title37', 'Kill the bugs'
@@ -0,0 +1,21 @@
1
+ open "/oo/testnode37.html?test=toggle1"
2
+ assert_element_not_present "css=ul.references > li"
3
+
4
+ # Add relation
5
+ # Cannot test click on non-link in Safari and Chrome...
6
+ click 'css=#toggle11_19.toggle.off > input.cb'
7
+ wait_for_element_present 'css=#toggle11_19.toggle.on'
8
+ verify_value "css=#toggle11_19 > input.cb", "on"
9
+
10
+ # Reload page
11
+ open "/oo/testnode37.html?test=toggle1"
12
+ verify_text "css=ul.references > li", "Secret"
13
+
14
+ # Remove relation
15
+ click 'css=#toggle11_19.toggle.on > input.cb'
16
+ wait_for_element_present 'css=#toggle11_19.toggle.off'
17
+ verify_value "css=#toggle11_19 > input.cb", "off"
18
+
19
+ # Reload page
20
+ open "/oo/testnode37.html?test=toggle1"
21
+ assert_element_not_present "css=ul.references > li"
@@ -201,10 +201,10 @@ strange:
201
201
  dgroup: workers
202
202
  skin: default
203
203
 
204
- track:
204
+ test:
205
205
  zip: 37
206
- class: Tracker
207
- parent: cleanWater
206
+ class: TestNode
207
+ parent: zena
208
208
 
209
209
  talk:
210
210
  zip: 38
@@ -315,7 +315,7 @@ notes_zafu:
315
315
  class: Template
316
316
  parent: default
317
317
 
318
- Node_test_zafu:
318
+ TestNode_zafu:
319
319
  class: Template
320
320
  parent: default
321
321