zena 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +28 -0
- data/README.rdoc +6 -6
- data/Rakefile +3 -0
- data/app/controllers/users_controller.rb +4 -2
- data/app/models/acl.rb +6 -0
- data/app/models/cached_page.rb +2 -1
- data/app/models/document.rb +3 -4
- data/app/models/node.rb +8 -5
- data/app/models/site.rb +1 -1
- data/app/models/template.rb +2 -2
- data/app/models/user.rb +5 -3
- data/app/views/acls/_add.rhtml +2 -1
- data/app/views/acls/_form.rhtml +15 -7
- data/app/views/acls/_li.rhtml +2 -0
- data/app/views/acls/index.rhtml +3 -1
- data/app/views/acls/show.html.erb +1 -1
- data/app/views/links/destroy.rjs +16 -2
- data/app/views/versions/destroy.rjs +1 -1
- data/app/views/zafu/default/Node-admin.zafu +1 -1
- data/bin/zena +5 -3
- data/bricks/acls/lib/bricks/acls.rb +11 -4
- data/bricks/acls/zena/migrate/20110627193757_add_allowed_mode_and_format_to_acl.rb +11 -0
- data/bricks/acls/zena/test/integration/acl_integration_test.rb +42 -0
- data/bricks/acls/zena/test/sites/erebus/acls.yml +8 -0
- data/bricks/mongrel/zena/deploy.rb +19 -0
- data/bricks/single/lib/bricks/single.rb +15 -0
- data/bricks/single/zena/init.rb +1 -0
- data/bricks/sphinx/zena/tasks.rb +1 -1
- data/bricks/static/lib/bricks/static.rb +151 -0
- data/bricks/static/zena/init.rb +1 -0
- data/bricks/static/zena/migrate/20110702010330_add_static_to_idx_templates.rb +12 -0
- data/bricks/static/zena/skins/blog/Image-edit.zafu +6 -0
- data/bricks/static/zena/skins/blog/Image.zafu +19 -0
- data/bricks/static/zena/skins/blog/Node-+index.zafu +1 -0
- data/bricks/static/zena/skins/blog/Node-+notFound.zafu +7 -0
- data/bricks/static/zena/skins/blog/Node-+search.zafu +19 -0
- data/bricks/static/zena/skins/blog/Node.zafu +66 -0
- data/bricks/static/zena/skins/blog/Post.zafu +12 -0
- data/bricks/static/zena/skins/blog/Project--kml.zafu +30 -0
- data/bricks/static/zena/skins/blog/Project.zafu +45 -0
- data/bricks/static/zena/skins/blog/comments.zafu +30 -0
- data/bricks/static/zena/skins/blog/dict.yml +11 -0
- data/bricks/static/zena/skins/blog/img/dateBg.jpg +0 -0
- data/bricks/static/zena/skins/blog/img/header.png +0 -0
- data/bricks/static/zena/skins/blog/img/mapPin.png +0 -0
- data/bricks/static/zena/skins/blog/img/menu.gif +0 -0
- data/bricks/static/zena/skins/blog/img/menuover.gif +0 -0
- data/bricks/static/zena/skins/blog/img/style.css +110 -0
- data/bricks/static/zena/test/integration/static_integration_test.rb +30 -0
- data/bricks/static/zena/test/unit/static_test.rb +33 -0
- data/bricks/zena/zena/migrate/01_base.rb +1 -2
- data/bricks/zena/zena/migrate/20110623072048_fix_cached_path_index.rb +10 -0
- data/bricks/zena/zena/migrate/20110710113731_remove_icon_field.rb +18 -0
- data/config/bricks.yml +4 -0
- data/config/deploy.rb +17 -2
- data/config/gems.yml +9 -7
- data/config/selenium.yml +38 -0
- data/lib/bricks/requirements_validation.rb +8 -2
- data/lib/gettext_strings.rb +2 -1
- data/lib/tasks/zena.rake +5 -0
- data/lib/zena/app.rb +12 -0
- data/lib/zena/console.rb +9 -1
- data/lib/zena/core_ext/string.rb +7 -2
- data/lib/zena/deploy.rb +60 -6
- data/lib/zena/deploy/app_init.rhtml +56 -0
- data/lib/zena/deploy/haproxy.cnf.rhtml +34 -0
- data/lib/zena/deploy/httpd.rhtml +6 -0
- data/lib/zena/deploy/start_stop.rhtml +35 -0
- data/lib/zena/info.rb +1 -1
- data/lib/zena/remote/connection.rb +1 -1
- data/lib/zena/site_worker.rb +9 -5
- data/lib/zena/use.rb +1 -1
- data/lib/zena/use/action.rb +2 -2
- data/lib/zena/use/ajax.rb +22 -9
- data/lib/zena/use/conditional.rb +5 -0
- data/lib/zena/use/context.rb +6 -1
- data/lib/zena/use/dates.rb +17 -2
- data/lib/zena/use/display.rb +14 -3
- data/lib/zena/use/forms.rb +37 -47
- data/lib/zena/use/html_tags.rb +3 -0
- data/lib/zena/use/node_context.rb +17 -17
- data/lib/zena/use/rendering.rb +1 -1
- data/lib/zena/use/urls.rb +11 -2
- data/lib/zena/use/zafu_attributes.rb +1 -0
- data/lib/zena/use/zafu_safe_definitions.rb +16 -1
- data/lib/zena/use/zafu_templates.rb +39 -24
- data/lib/zena/use/zazen.rb +1 -0
- data/locale/de/LC_MESSAGES/zena.mo +0 -0
- data/locale/de/zena.po +105 -89
- data/locale/en/LC_MESSAGES/zena.mo +0 -0
- data/locale/en/zena.mo +0 -0
- data/locale/en/zena.po +188 -253
- data/locale/fr/LC_MESSAGES/zena.mo +0 -0
- data/locale/fr/zena.mo +0 -0
- data/locale/fr/zena.po +200 -257
- data/locale/zena.pot +95 -85
- data/public/javascripts/zena.js +2 -2
- data/test/fixtures/files/{Node-test.zafu → TestNode.zafu} +206 -4
- data/test/functional/nodes_controller_test.rb +2 -2
- data/test/integration/navigation_test.rb +9 -3
- data/test/integration/query_node/basic.yml +4 -4
- data/test/integration/query_node/filters.yml +2 -2
- data/test/integration/zafu_compiler/ajax.yml +6 -6
- data/test/integration/zafu_compiler/basic.yml +1 -1
- data/test/integration/zafu_compiler/calendar.yml +4 -3
- data/test/integration/zafu_compiler/conditional.yml +3 -10
- data/test/integration/zafu_compiler/context.yml +1 -1
- data/test/integration/zafu_compiler/dates.yml +9 -1
- data/test/integration/zafu_compiler/display.yml +7 -1
- data/test/integration/zafu_compiler/eval.yml +12 -46
- data/test/integration/zafu_compiler/forms.yml +1 -1
- data/test/integration/zafu_compiler/query.yml +2 -2
- data/test/integration/zafu_compiler/relations.yml +19 -9
- data/test/integration/zafu_compiler/roles.yml +12 -0
- data/test/integration/zafu_compiler/safe_definitions.yml +1 -1
- data/test/integration/zafu_compiler/urls.yml +13 -5
- data/test/integration/zafu_compiler/version.yml +6 -0
- data/test/integration/zafu_compiler/zafu_attributes.yml +4 -4
- data/test/integration/zafu_compiler_test.rb +1 -1
- data/test/selenium.readme +8 -0
- data/test/selenium/Add/0setup.rsel +12 -0
- data/test/selenium/Add/add1.rsel +22 -0
- data/test/selenium/Add/add2.rsel +22 -0
- data/test/selenium/Add/add3.rsel +22 -0
- data/test/selenium/Drop/0setup.rsel +12 -0
- data/test/selenium/Drop/drop1.rsel +25 -0
- data/test/selenium/Drop/drop2.rsel +25 -0
- data/test/selenium/Drop/drop3.rsel +51 -0
- data/test/selenium/Drop/drop4.rsel +44 -0
- data/test/selenium/Drop/drop5.rsel +16 -0
- data/test/selenium/Edit/0setup.rsel +12 -0
- data/test/selenium/Edit/edit1.rsel +31 -0
- data/test/selenium/Edit/edit2.rsel +39 -0
- data/test/selenium/Edit/edit3.rsel +40 -0
- data/test/selenium/Form/0setup.rsel +12 -0
- data/test/selenium/Form/form1.rsel +9 -0
- data/test/selenium/Form/form2.rsel +9 -0
- data/test/selenium/Paginate/0setup.rsel +12 -0
- data/test/selenium/Paginate/paginate1.rsel +24 -0
- data/test/selenium/Toggle/0setup.rsel +12 -0
- data/test/selenium/Toggle/toggle1.rsel +21 -0
- data/test/sites/zena/nodes.yml +4 -4
- data/test/sites/zena/roles.yml +3 -2
- data/test/sites/zena/versions.yml +12 -11
- data/test/unit/core_ext_test.rb +23 -5
- data/test/unit/document_test.rb +6 -2
- data/test/unit/node_test.rb +2 -2
- data/test/unit/remote_test.rb +1 -2
- data/test/unit/role_test.rb +2 -2
- data/test/unit/user_test.rb +48 -1
- data/test/unit/virtual_class_test.rb +7 -7
- data/test/unit/zena/acts/secure_test.rb +1 -1
- data/test/unit/zena/use/rendering_test.rb +1 -1
- data/test/unit/zena/use/urls_test.rb +3 -3
- data/zena.gemspec +65 -101
- metadata +67 -103
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run 2.tmCommand +0 -24
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Context.tmCommand +0 -58
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run Focused Should.tmCommand +0 -88
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/Run.tmCommand +0 -27
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Commands/YAML to Shoulda.tmCommand +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Context.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Preferences/Symbol List: Should.tmPreferences +0 -19
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory attributes for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory build.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define with class.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_define.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_next.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/Factory_sequence.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_bad_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_contains.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_does_not_contain.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_good_value.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_same_elements.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_save.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_sent_email.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/assert_valid.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/association.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/attribute.tmSnippet +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/before_should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block get.tmSnippet +0 -22
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block post.tmSnippet +0 -23
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/context block with setup.tmSnippet +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/setup.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block with before proc.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should block.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful denied.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_be_restful.tmSnippet +0 -20
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_belong_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change by.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_change from to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_at_least.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_length_is.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_ensure_value_in_range.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_eventually.tmSnippet +0 -18
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_filter_params.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_and_belong_to_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_class_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_column.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_db_columns.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_index.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_indices.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_instance_methods.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_many.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_named_scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_one.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_have_readonly_attributes.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_mass_assignment_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_allow_values_for.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_assign_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_change.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_not_set_the_flash.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_redirect_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_a_form.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_template.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_with_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_render_without_layout.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_respond_with_content_type.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_return_from_session.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_route.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_set_the_flash_to.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_acceptance_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_numericality_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_presence_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of with scope.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Snippets/should_validate_uniqueness_of.tmSnippet +0 -16
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/run_script.rb +0 -104
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/test.rb +0 -17
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/RubyMate/todo.txt +0 -13
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Support/bin/yaml_to_shoulda.rb +0 -25
- data/vendor/TextMate/Ruby Shoulda.tmbundle/Syntaxes/Ruby on Rails (Shoulda).tmLanguage +0 -166
- data/vendor/TextMate/Ruby Shoulda.tmbundle/info.plist +0 -304
- data/vendor/TextMate/Zena.tmbundle/Commands/Run all yaml tests.tmCommand +0 -37
- data/vendor/TextMate/Zena.tmbundle/Commands/Run focused yaml test.tmCommand +0 -52
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/catch_exception.rb +0 -39
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/run_script.rb +0 -118
- data/vendor/TextMate/Zena.tmbundle/Support/RubyMate/stdin_dialog.rb +0 -14
- 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"
|
data/test/sites/zena/nodes.yml
CHANGED
|
@@ -201,10 +201,10 @@ strange:
|
|
|
201
201
|
dgroup: workers
|
|
202
202
|
skin: default
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
test:
|
|
205
205
|
zip: 37
|
|
206
|
-
class:
|
|
207
|
-
parent:
|
|
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
|
-
|
|
318
|
+
TestNode_zafu:
|
|
319
319
|
class: Template
|
|
320
320
|
parent: default
|
|
321
321
|
|