files.each do |m|
mt = chash[m[1]+m[2]].andand.manifest_text
if not m[4].nil? and m[4].size > 1
- combined += arv_normalize mt, '--extract', m[4][1..-1]
+ combined += arv_normalize mt, '--extract', ".#{m[4]}"
else
combined += mt
end
end
end
+ test "combine selected collection files from collection subdirectory" do
+ headless = Headless.new
+ headless.start
+ Capybara.current_driver = :selenium
+
+ visit page_with_token('user1_with_load', "/collections/zzzzz-4zz18-filesinsubdir00")
+
+ # now in collection page
+ input_files = page.all('input[type=checkbox]')
+ (0..input_files.count-1).each do |i|
+ input_files[i].click
+ end
+
+ click_button 'Selection...'
+ within('.selection-action-container') do
+ click_link 'Create new collection with selected files'
+ end
+
+ # now in the newly created collection page
+ assert(page.has_text?('file_in_subdir1'), 'file not found - file_in_subdir1')
+ assert(page.has_text?('file1_in_subdir3.txt'), 'file not found - file1_in_subdir3.txt')
+ assert(page.has_text?('file2_in_subdir3.txt'), 'file not found - file2_in_subdir3.txt')
+ assert(page.has_text?('file1_in_subdir4.txt'), 'file not found - file1_in_subdir4.txt')
+ assert(page.has_text?('file2_in_subdir4.txt'), 'file not found - file1_in_subdir4.txt')
+
+ headless.stop
+ end
+
test "Collection portable data hash redirect" do
di = api_fixture('collections')['docker_image']
visit page_with_token('active', "/collections/#{di['portable_data_hash']}")
assert page.has_no_text?("Activity")
assert page.has_no_text?("Sharing and permissions")
end
-
end
created_at: 2014-10-15T10:45:00
name: Collection to remove from subproject
+collection_with_files_in_subdir:
+ uuid: zzzzz-4zz18-filesinsubdir00
+ name: collection_files_in_subdir
+ portable_data_hash: 85877ca2d7e05498dd3d109baf2df106+95
+ owner_uuid: zzzzz-tpzed-user1withloadab
+ created_at: 2014-02-03T17:22:54Z
+ modified_by_client_uuid: zzzzz-ozdt8-brczlopd8u8d0jr
+ modified_by_user_uuid: zzzzz-tpzed-user1withloadab
+ modified_at: 2014-02-03T17:22:54Z
+ updated_at: 2014-02-03T17:22:54Z
+ manifest_text: ". 85877ca2d7e05498dd3d109baf2df106+95+A3a4e26a366ee7e4ed3e476ccf05354761be2e4ae@545a9920 0:95:file_in_subdir1\n./subdir2/subdir3 2bbc341c702df4d8f42ec31f16c10120+64+A315d7e7bad2ce937e711fc454fae2d1194d14d64@545a9920 0:32:file1_in_subdir3.txt 32:32:file2_in_subdir3.txt\n./subdir2/subdir3/subdir4 2bbc341c702df4d8f42ec31f16c10120+64+A315d7e7bad2ce937e711fc454fae2d1194d14d64@545a9920 0:32:file1_in_subdir4.txt 32:32:file2_in_subdir4.txt"
+
# Test Helper trims the rest of the file
# Do not add your fixtures below this line as the rest of this file will be trimmed by test_helper