zena 1.1.1 → 1.1.2
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 +15 -0
- data/app/controllers/nodes_controller.rb +13 -8
- data/app/models/acl.rb +19 -5
- data/app/models/column.rb +2 -0
- data/app/models/node.rb +3 -2
- data/app/models/site.rb +3 -0
- data/app/models/user.rb +1 -1
- data/app/views/columns/_add.html.erb +2 -2
- data/app/views/columns/_form.html.erb +8 -2
- data/app/views/columns/_li.html.erb +4 -1
- data/app/views/columns/index.html.erb +2 -2
- data/app/views/zafu/default/Node-+adminLayout.zafu +9 -1
- data/app/views/zafu/default/Node-admin.zafu +6 -3
- data/bricks/acls/lib/bricks/acls.rb +7 -7
- data/bricks/acls/zena/test/unit/acl_test.rb +33 -11
- data/bricks/math/lib/bricks/math.rb +11 -8
- data/bricks/worker/zena/worker +1 -0
- data/bricks/zena/zena/migrate/20111101103900_add_comment_to_columns.rb +9 -0
- data/config/gems.yml +7 -4
- data/lib/bricks.rb +2 -0
- data/lib/bricks/helper.rb +18 -0
- data/lib/zena.rb +1 -1
- data/lib/zena/console.rb +24 -0
- data/lib/zena/db_helper/abstract_db.rb +5 -2
- data/lib/zena/db_helper/mysql.rb +6 -3
- data/lib/zena/info.rb +1 -1
- data/lib/zena/init.rb +22 -0
- data/lib/zena/use/ajax.rb +1 -1
- data/lib/zena/use/forms.rb +6 -2
- data/lib/zena/use/i18n.rb +13 -65
- data/lib/zena/use/ml_index.rb +15 -0
- data/lib/zena/use/query_node.rb +10 -7
- data/lib/zena/use/rendering.rb +5 -0
- data/lib/zena/use/upload.rb +5 -2
- data/lib/zena/use/version_hash.rb +2 -0
- data/public/stylesheets/backend.css +6 -3
- data/public/stylesheets/zena.css +2 -2
- data/test/integration/navigation_test.rb +25 -1
- data/test/integration/query_node/basic.yml +6 -1
- data/test/integration/query_node/filters.yml +6 -1
- data/test/integration/query_node/idx_scope.yml +10 -0
- data/test/integration/zafu_compiler/ajax.yml +19 -0
- data/test/integration/zafu_compiler/display.yml +4 -0
- data/test/integration/zafu_compiler/meta.yml +8 -0
- data/test/selenium/Drop/drop1.rsel +6 -10
- data/test/selenium/Drop/drop2.rsel +6 -3
- data/test/selenium/Drop/drop3.rsel +19 -34
- data/test/selenium/Drop/drop4.rsel +25 -33
- data/test/sites/zena/columns.yml +4 -3
- data/test/unit/bricks_test.rb +24 -0
- data/test/unit/column_test.rb +5 -0
- data/test/unit/zena/use/ml_index_test.rb +26 -0
- data/test/unit/zena/use/version_hash_test.rb +0 -1
- data/zena.gemspec +28 -122
- metadata +85 -145
data/lib/zena/use/rendering.rb
CHANGED
data/lib/zena/use/upload.rb
CHANGED
@@ -144,6 +144,9 @@ module Zena
|
|
144
144
|
end # ControllerMethods
|
145
145
|
|
146
146
|
module ViewMethods
|
147
|
+
include RubyLess
|
148
|
+
safe_method [:upload_field, {:type => String}] => String
|
149
|
+
|
147
150
|
UPLOAD_KEY = defined?(Mongrel) ? 'upload_id' : "X-Progress-ID"
|
148
151
|
def upload_form_tag(url_opts, html_opts = {})
|
149
152
|
@uuid = UUIDTools::UUID.random_create.to_s.gsub('-','')
|
@@ -162,8 +165,8 @@ module Zena
|
|
162
165
|
end
|
163
166
|
|
164
167
|
def upload_field(opts = {})
|
165
|
-
case opts[:type]
|
166
|
-
when
|
168
|
+
case opts[:type].to_s
|
169
|
+
when 'onclick'
|
167
170
|
link = link_to_remote(_("change"), :update=>'upload_field', :url => get_uf_documents_path(:uuid => @uuid), :method => :get, :complete=>"['file', 'upload_field'].each(Element.toggle);")
|
168
171
|
<<-TXT
|
169
172
|
<label for='attachment'>#{_('file')}</label>
|
@@ -6,6 +6,8 @@ module Zena
|
|
6
6
|
#
|
7
7
|
# Technically, the vhash field contains two dictionaries "readonly" and "write". Each of these dictionaries
|
8
8
|
# provide mapping from languages to version id.
|
9
|
+
#
|
10
|
+
# {'r' => {'en' => 1234, 'fr' => 3456}, 'w' => {'en' => 5436, 'fr' => 4526}}
|
9
11
|
module VersionHash
|
10
12
|
def self.cached_values_from_records(records)
|
11
13
|
r_hash, w_hash = {}, {}
|
@@ -8,11 +8,13 @@ a {text-decoration:none; color:inherit; }
|
|
8
8
|
#container { border:1px solid black; background:#eee; margin:3em auto;}
|
9
9
|
#logo, #container {width:900px; display:table; margin:1em auto;}
|
10
10
|
|
11
|
-
#menu
|
11
|
+
#menu {float:left; display:table; width:150px; background:#ddd; margin: 0 20px 20px 0;}
|
12
12
|
#menu li a { padding:4px; border:1px solid #333; border-width:0 1px 1px 0; display:block;}
|
13
13
|
#menu li a.on { background:#f7d493;}
|
14
14
|
|
15
|
-
#
|
15
|
+
#title { clear:left}
|
16
|
+
|
17
|
+
#content {padding-top:1px;}
|
16
18
|
#content h2.title {margin:20px; color:black; font-weight:bold; font-size:18px;}
|
17
19
|
#content table.admin {margin-bottom:2em;}
|
18
20
|
|
@@ -45,7 +47,7 @@ a {text-decoration:none; color:inherit; }
|
|
45
47
|
#preview .zazen {height:220px; overflow:auto; padding:10px; }
|
46
48
|
h2.preview {position:absolute; top:7px; right:-4px;}
|
47
49
|
h2.preview a { background:#ccc; padding:0.5em; font-size:18px; font-weight:bold;}
|
48
|
-
h2.preview:hover a {background:#fbeab6;}
|
50
|
+
h2.preview:hover a, #menu li:hover a {background:#fbeab6;}
|
49
51
|
#preview .med_prev {background:#444; width:100%;}
|
50
52
|
#preview .crop { position:absolute; bottom:10px; right:10px; visibility:hidden; display:block;}
|
51
53
|
#preview:hover .crop { visibility:visible;}
|
@@ -69,3 +71,4 @@ fieldset {float:left; border:1px solid #777; padding:3px; margin:5px;}
|
|
69
71
|
#crop .win { display:table; margin:80px auto; background:#999; padding:20px;}
|
70
72
|
#crop .crop_options {display:none;}
|
71
73
|
#crop .btn input {float:right}
|
74
|
+
|
data/public/stylesheets/zena.css
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
.actions { margin-left:5px; }
|
14
14
|
.actions img {border:none; vertical-align:middle;}
|
15
15
|
.s50 .actions, .li_s50 .actions { visibility:hidden; }
|
16
|
-
|
16
|
+
*:hover>.s50 .actions, .li_s50:hover .actions { visibility:visible; }
|
17
17
|
.actions a:hover { background:#F9E1AD; }
|
18
18
|
|
19
19
|
/* forms & form actions */
|
@@ -86,4 +86,4 @@ ins.differ, ins.differ * { background:#cfc; text-decoration:none; padding:1px 2p
|
|
86
86
|
#pg_info .summary {clear:both; padding:3px 10px 10px;}
|
87
87
|
#pg_info a { width:100px; height:40px;}
|
88
88
|
#pg_next {position:absolute; right:0; background:url('/images/popup_next.png?1276089554') no-repeat right top;}
|
89
|
-
#pg_prev {position:absolute; left:0; background:url('/images/popup_prev.png?1276089554') no-repeat left top;}
|
89
|
+
#pg_prev {position:absolute; left:0; background:url('/images/popup_prev.png?1276089554') no-repeat left top;}
|
@@ -226,6 +226,15 @@ class NavigationTest < Zena::Integration::TestCase
|
|
226
226
|
assert_redirected_to 'http://test.host/fr'
|
227
227
|
end
|
228
228
|
end # without clues
|
229
|
+
|
230
|
+
context 'with lang on bad url' do
|
231
|
+
should 'set lang from url' do
|
232
|
+
get 'http://test.host/de/foobar'
|
233
|
+
assert_response :not_found
|
234
|
+
assert_equal 'de', session[:lang]
|
235
|
+
assert_equal 'de', visitor.lang
|
236
|
+
end
|
237
|
+
end
|
229
238
|
end # Selecting lang
|
230
239
|
|
231
240
|
context 'In an intranet' do
|
@@ -292,6 +301,21 @@ class NavigationTest < Zena::Integration::TestCase
|
|
292
301
|
assert_equal 'fr', session[:lang]
|
293
302
|
end
|
294
303
|
|
304
|
+
context 'With new languages defined' do
|
305
|
+
setup do
|
306
|
+
login(:lion)
|
307
|
+
assert visitor.site.update_attributes(:languages => 'en,fr,cn')
|
308
|
+
end
|
309
|
+
|
310
|
+
should 'compile templates' do
|
311
|
+
post 'http://test.host/session', :login=>'lion', :password=>'lion'
|
312
|
+
get 'http://test.host/oo?lang=cn'
|
313
|
+
assert_redirected_to 'http://test.host/oo'
|
314
|
+
follow_redirect!
|
315
|
+
assert_response :success
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
295
319
|
context 'On a page with custom base' do
|
296
320
|
setup do
|
297
321
|
login(:lion)
|
@@ -332,7 +356,7 @@ class NavigationTest < Zena::Integration::TestCase
|
|
332
356
|
login(:lion)
|
333
357
|
secure(Template) { Template.create(:parent_id => nodes_id(:default), :title => 'Project-changes.zafu', :v_status => Zena::Status::Pub, :text => 'nothing ever changes in "<r:title/>"') }
|
334
358
|
end
|
335
|
-
|
359
|
+
|
336
360
|
subject do
|
337
361
|
'http://test.host/en/projects-list/Clean-Water-project_changes'
|
338
362
|
end
|
@@ -140,4 +140,9 @@ paginate_two:
|
|
140
140
|
|
141
141
|
select_index_field:
|
142
142
|
src: "nodes select title as ti"
|
143
|
-
sql: "/SELECT nodes.*,ml1.value AS `ti`/"
|
143
|
+
sql: "/SELECT nodes.*,ml1.value AS `ti`/"
|
144
|
+
|
145
|
+
coalesce:
|
146
|
+
src: "nodes in site order by parent_id.coalesce(0) asc limit 1"
|
147
|
+
sql: "%Q{SELECT nodes.* FROM nodes WHERE #{secure_scope('nodes')} ORDER BY COALESCE(nodes.parent_id,0) ASC LIMIT 1}"
|
148
|
+
res: "Zena the wild CMS"
|
@@ -131,4 +131,9 @@ quoted_literal:
|
|
131
131
|
src: "nodes where tag=\"10'000\" in site"
|
132
132
|
sql: "%Q{SELECT nodes.* FROM links AS ta1,nodes WHERE #{secure_scope('nodes')} AND ta1.comment = '10\\\\'000' AND nodes.id = ta1.source_id AND ta1.relation_id IS NULL ORDER BY nodes.zip ASC}"
|
133
133
|
res: ''
|
134
|
-
# filters on ml strings are in properties.yml
|
134
|
+
# filters on ml strings are in properties.yml
|
135
|
+
|
136
|
+
coalesce_in_filter:
|
137
|
+
src: "posts select date.coalesce('2011-11-01') as da in site"
|
138
|
+
sql: "%Q{SELECT nodes.*,COALESCE(nodes.idx_datetime1,'2011-11-01') AS `da` FROM nodes WHERE #{secure_scope('nodes')} AND nodes.kpath LIKE 'NNP%' ORDER BY nodes.zip ASC}"
|
139
|
+
res: 'super ouverture'
|
@@ -30,4 +30,14 @@ or_keys:
|
|
30
30
|
id_key:
|
31
31
|
src: "blogs where id = 29 in site"
|
32
32
|
sql: '!/idx_projects/'
|
33
|
+
res: 'a wiki with Zena'
|
34
|
+
|
35
|
+
sort_by_scoped_value:
|
36
|
+
src: "blogs in site order by contact.name asc"
|
37
|
+
sql: "%Q{SELECT nodes.* FROM idx_projects AS sc1,nodes WHERE #{secure_scope('nodes')} AND nodes.id = sc1.node_id AND nodes.kpath LIKE 'NPPB%' ORDER BY sc1.contact_name ASC}"
|
38
|
+
res: 'a wiki with Zena'
|
39
|
+
|
40
|
+
should_not_mess_with_select:
|
41
|
+
src: "blogs select title as blog_title in site order by contact.name asc"
|
42
|
+
sql: "%Q{SELECT nodes.*,ml1.value AS `blog_title` FROM idx_nodes_ml_strings AS ml1,idx_projects AS sc1,nodes WHERE #{secure_scope('nodes')} AND nodes.id = sc1.node_id AND ml1.lang = 'fr' AND ml1.key = 'title' AND ml1.node_id = nodes.id AND nodes.kpath LIKE 'NPPB%' ORDER BY sc1.contact_name ASC}"
|
33
43
|
res: 'a wiki with Zena'
|
@@ -326,6 +326,25 @@ drop_param_in_each:
|
|
326
326
|
tem: "/<div class='drop' id='<%= %Q\{list1_#\{var2.zip\}\} %>'><% add_drop_id\(%Q\{list1_#\{var2.zip\}\}/"
|
327
327
|
'ajax/drop/param/in/each/en/list1.erb': "/ndom_id.*ndom_id"
|
328
328
|
|
329
|
+
drop_in_each_id:
|
330
|
+
context:
|
331
|
+
node: ant
|
332
|
+
src: |
|
333
|
+
<div class='test' id='drop1' do='Contact?'>
|
334
|
+
<ul do='pages in site limit 3'>
|
335
|
+
<li do='each' draggable='true' do='title'/>
|
336
|
+
</ul>
|
337
|
+
<ul do='drop' set='favorite' change='receiver' do='favorites'>
|
338
|
+
<li class='#{id}' do='each'><r:unlink/> <r:title/></li>
|
339
|
+
</ul>
|
340
|
+
</div>
|
341
|
+
# Should use prefix from "drop", not list of favorites.
|
342
|
+
res: "/drop13_39/"
|
343
|
+
# Show drop element
|
344
|
+
'ajax/drop/in/each/id/en/drop12.erb': "/^\s*<ul.*<li id='<%= %Q\{drop13_#\{var2.zip\}\} %>"
|
345
|
+
# Show each element
|
346
|
+
'ajax/drop/in/each/id/en/drop13.erb': '/^\s*<li/'
|
347
|
+
|
329
348
|
update_target:
|
330
349
|
src: "UT: <div id='foo' do='block'>...</div> <r:link update='foo'/>"
|
331
350
|
tem: "/UT: <div id='foo'>...</div> .*Ajax.Request.*:dom_id => %Q\{foo\}/"
|
@@ -391,3 +391,7 @@ insert_slash_slash_exclam:
|
|
391
391
|
array_literal:
|
392
392
|
src: "<p do='%w{one two}'><span do='each' join=', ' do='this'/></p>"
|
393
393
|
res: "<p><span>one</span>, <span>two</span></p>"
|
394
|
+
|
395
|
+
style_tag:
|
396
|
+
src: "<r:style>.foo <r:title/></r:style>"
|
397
|
+
res: "<style>.foo status title</style>"
|
@@ -32,6 +32,14 @@ include_part_replace_method:
|
|
32
32
|
src: "include_part: <r:include template='/meta/id/name' part='bob' do='title'/>"
|
33
33
|
tem: "include_part: <b><%= @node.prop['title'] %></b>"
|
34
34
|
|
35
|
+
id_do:
|
36
|
+
src: "<h1 id='logo' do='title'/>"
|
37
|
+
res: "<h1 id='logo'>status title</h1>"
|
38
|
+
|
39
|
+
id_do_with:
|
40
|
+
src: "include_part: <r:include template='/meta/id/do' do='with' part='logo' do='t'>foo</r:include>"
|
41
|
+
res: "include_part: <h1 id='logo'>foo</h1>"
|
42
|
+
|
35
43
|
# this test is a dummy used by include_context
|
36
44
|
context_dummy:
|
37
45
|
src: "CD: <r:pages in='site' where='title like \"s%\"' name='pages'><r:each join=', ' do='title'/></r:pages>"
|
@@ -1,28 +1,24 @@
|
|
1
1
|
open "/oo/testnode37.html?test=drop1"
|
2
|
-
assert_element_not_present '
|
2
|
+
assert_element_not_present 'drop13_33'
|
3
3
|
|
4
4
|
# Drag & Drop
|
5
5
|
set_timeout 4000
|
6
6
|
drag_and_drop_to_object "css=#drop11_33 > span.drag_handle", "drop12"
|
7
|
-
wait_for_element_present "
|
8
|
-
verify_text "
|
7
|
+
wait_for_element_present "drop13_33"
|
8
|
+
verify_text "drop13_33", "Art"
|
9
9
|
# Unlink
|
10
10
|
click "css=img[alt=remove]"
|
11
|
-
wait_for_element_not_present "
|
11
|
+
wait_for_element_not_present "drop13_33"
|
12
12
|
|
13
13
|
# Restart
|
14
14
|
|
15
15
|
# Drag & Drop
|
16
16
|
drag_and_drop_to_object "css=#drop11_33 > span.drag_handle", "drop12"
|
17
|
-
wait_for_element_present "
|
18
|
-
verify_text "
|
17
|
+
wait_for_element_present "drop13_33"
|
18
|
+
verify_text "drop13_33", "Art"
|
19
19
|
|
20
20
|
# Make sure the changes are commited to db
|
21
21
|
open "/oo/testnode37.html?test=drop1"
|
22
|
-
# This is a bug that is difficult to fix and has no consequences (drop
|
23
|
-
# works perfectly well)
|
24
|
-
# It should be drop12_33 but it is drop13_33 when inline.
|
25
|
-
# assert_element_present 'drop12_33'
|
26
22
|
assert_element_present 'drop13_33'
|
27
23
|
# Unlink
|
28
24
|
click "css=img[alt=remove]"
|
@@ -1,8 +1,9 @@
|
|
1
1
|
open "/oo/testnode37.html?test=drop2"
|
2
|
-
assert_element_not_present '
|
2
|
+
assert_element_not_present 'drop22_29_33'
|
3
3
|
|
4
4
|
# Drag & Drop
|
5
5
|
set_timeout 4000
|
6
|
+
command 'setSpeed', 10
|
6
7
|
drag_and_drop_to_object "css=#drop21_33 > span.drag_handle", "drop22_29"
|
7
8
|
wait_for_element_present "drop22_29_33"
|
8
9
|
verify_text "drop22_29_33", "Art"
|
@@ -19,9 +20,11 @@ verify_text "drop22_21_33", "Art"
|
|
19
20
|
|
20
21
|
# Make sure the changes are commited to db
|
21
22
|
open "/oo/testnode37.html?test=drop2"
|
22
|
-
# Should be drop22_21_33 but the prefix is drop23..
|
23
|
-
#assert_element_present 'drop22_21_33'
|
24
23
|
assert_element_present 'drop23_21_33'
|
24
|
+
# Should be
|
25
|
+
# assert_element_present 'drop22_21_33'
|
25
26
|
# Unlink
|
26
27
|
click "css=#drop23_21_33 img[alt=remove]"
|
27
28
|
wait_for_element_not_present "drop23_21_33"
|
29
|
+
|
30
|
+
command 'setSpeed', 0
|
@@ -1,51 +1,36 @@
|
|
1
1
|
# Drag from list in each.
|
2
|
-
=begin
|
3
2
|
open "/oo/testnode37.html?test=drop3"
|
4
|
-
assert_element_not_present '
|
3
|
+
assert_element_not_present 'drop33_26'
|
5
4
|
|
6
5
|
# Drag & Drop
|
7
6
|
set_timeout 4000
|
8
|
-
drag_and_drop_to_object "css=#
|
9
|
-
wait_for_element_present "
|
10
|
-
verify_text "
|
7
|
+
drag_and_drop_to_object "css=#drop13_21_26 > span.drag_handle", "drop32"
|
8
|
+
wait_for_element_present "drop33_26"
|
9
|
+
verify_text "drop33_26", "crocodiles"
|
11
10
|
# Unlink
|
12
11
|
click "css=img[alt=remove]"
|
13
|
-
wait_for_element_not_present "
|
12
|
+
wait_for_element_not_present "drop33_26"
|
14
13
|
|
15
14
|
# Restart
|
16
15
|
|
17
16
|
# Drag & Drop
|
18
|
-
drag_and_drop_to_object "css=#
|
19
|
-
wait_for_element_present "
|
20
|
-
verify_text "
|
17
|
+
drag_and_drop_to_object "css=#drop13_21_26 > span.drag_handle", "drop32"
|
18
|
+
wait_for_element_present "drop33_26"
|
19
|
+
verify_text "drop33_26", "crocodiles"
|
21
20
|
|
22
21
|
# Drag & Drop from other location
|
23
|
-
|
24
|
-
|
25
|
-
wait_for_element_present "
|
26
|
-
verify_text "
|
22
|
+
command 'setSpeed', 500
|
23
|
+
drag_and_drop_to_object "css=#drop13_11_12 > span.drag_handle", "drop32"
|
24
|
+
wait_for_element_present "drop33_12"
|
25
|
+
verify_text "drop33_12", "people"
|
26
|
+
command 'setSpeed', 0
|
27
27
|
|
28
28
|
# Make sure the changes are commited to db
|
29
29
|
open "/oo/testnode37.html?test=drop3"
|
30
|
-
assert_element_present '
|
31
|
-
assert_element_present '
|
30
|
+
assert_element_present 'drop33_26'
|
31
|
+
assert_element_present 'drop33_12'
|
32
32
|
# Unlink
|
33
|
-
click "css=#
|
34
|
-
wait_for_element_not_present "
|
35
|
-
click "css=#
|
36
|
-
wait_for_element_not_present "
|
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
|
33
|
+
click "css=#drop33_26 img[alt=remove]"
|
34
|
+
wait_for_element_not_present "drop33_26"
|
35
|
+
click "css=#drop33_12 img[alt=remove]"
|
36
|
+
wait_for_element_not_present "drop33_12"
|
@@ -1,44 +1,36 @@
|
|
1
|
-
|
2
|
-
open "/oo/testnode37.html?test=
|
3
|
-
assert_element_not_present '
|
1
|
+
# Drag from list in each.
|
2
|
+
open "/oo/testnode37.html?test=drop4"
|
3
|
+
assert_element_not_present 'drop43_26'
|
4
4
|
|
5
5
|
# Drag & Drop
|
6
6
|
set_timeout 4000
|
7
|
-
drag_and_drop_to_object "css=#
|
8
|
-
wait_for_element_present "
|
9
|
-
verify_text "
|
7
|
+
drag_and_drop_to_object "css=#drop41_29 > span.drag_handle", "drop43"
|
8
|
+
wait_for_element_present "drop44_29"
|
9
|
+
verify_text "drop44_29", "a wiki with Zena"
|
10
10
|
# Unlink
|
11
|
-
click "css
|
12
|
-
wait_for_element_not_present "
|
11
|
+
click "css=#drop44_29 img[alt=remove]"
|
12
|
+
wait_for_element_not_present "drop44_29"
|
13
13
|
|
14
14
|
# Restart
|
15
15
|
|
16
16
|
# Drag & Drop
|
17
|
-
drag_and_drop_to_object "css=#
|
18
|
-
wait_for_element_present "
|
19
|
-
verify_text "
|
17
|
+
drag_and_drop_to_object "css=#drop41_29 > span.drag_handle", "drop43"
|
18
|
+
wait_for_element_present "drop44_29"
|
19
|
+
verify_text "drop44_29", "a wiki with Zena"
|
20
|
+
|
21
|
+
# Drag & Drop from other location
|
22
|
+
command 'setSpeed', 500
|
23
|
+
drag_and_drop_to_object "css=#drop42_33 > span.drag_handle", "drop43"
|
24
|
+
wait_for_element_present "drop44_33"
|
25
|
+
verify_text "drop44_33", "Art"
|
26
|
+
command 'setSpeed', 0
|
20
27
|
|
21
28
|
# Make sure the changes are commited to db
|
22
|
-
open "/oo/testnode37.html?test=
|
23
|
-
assert_element_present '
|
29
|
+
open "/oo/testnode37.html?test=drop4"
|
30
|
+
assert_element_present 'drop44_29'
|
31
|
+
assert_element_present 'drop44_33'
|
24
32
|
# Unlink
|
25
|
-
click "css
|
26
|
-
wait_for_element_not_present "
|
27
|
-
|
28
|
-
|
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
|
33
|
+
click "css=#drop44_29 img[alt=remove]"
|
34
|
+
wait_for_element_not_present "drop44_29"
|
35
|
+
click "css=#drop44_33 img[alt=remove]"
|
36
|
+
wait_for_element_not_present "drop44_33"
|
data/test/sites/zena/columns.yml
CHANGED
@@ -3,6 +3,7 @@ DEFAULTS:
|
|
3
3
|
|
4
4
|
|
5
5
|
Task_assigned:
|
6
|
+
comment: Name of user.
|
6
7
|
|
7
8
|
Original_origin:
|
8
9
|
index: string
|
@@ -12,7 +13,7 @@ Original_weight:
|
|
12
13
|
|
13
14
|
Original_tz:
|
14
15
|
|
15
|
-
Letter_paper:
|
16
|
+
Letter_paper:
|
16
17
|
|
17
18
|
Letter_search:
|
18
19
|
index: ml_string
|
@@ -26,7 +27,8 @@ Contact_name:
|
|
26
27
|
Post_date:
|
27
28
|
index: '.idx_datetime1'
|
28
29
|
ptype: datetime
|
29
|
-
|
30
|
+
comment: Publication date of the post (see "doc":20).
|
31
|
+
|
30
32
|
Contact_first_name:
|
31
33
|
|
32
34
|
Contact_email:
|
@@ -34,4 +36,3 @@ Contact_email:
|
|
34
36
|
Contact_address:
|
35
37
|
|
36
38
|
Contact_country:
|
37
|
-
|