[ARVADOS] updated: dfa41e508c0185d8b933b5d1af0aa5f473a10f3c

Git user git at public.curoverse.com
Tue Mar 28 11:26:18 EDT 2017


Summary of changes:
 .../workbench/test/integration/collections_test.rb | 32 ++++++++++++----------
 1 file changed, 18 insertions(+), 14 deletions(-)

       via  dfa41e508c0185d8b933b5d1af0aa5f473a10f3c (commit)
      from  823ef13277f4c5fe6711dc320bf9cd2f76492c2e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit dfa41e508c0185d8b933b5d1af0aa5f473a10f3c
Author: radhika <radhika at curoverse.com>
Date:   Tue Mar 28 11:25:35 2017 -0400

    3821: add an integration test to rename a file in a collection

diff --git a/apps/workbench/test/integration/collections_test.rb b/apps/workbench/test/integration/collections_test.rb
index 3d2767a..2685e52 100644
--- a/apps/workbench/test/integration/collections_test.rb
+++ b/apps/workbench/test/integration/collections_test.rb
@@ -299,13 +299,11 @@ class CollectionsTest < ActionDispatch::IntegrationTest
     refute_match(%r{/collections/#{col['uuid']}}, page.current_url)
   end
 
-  test "remove selected collection files using checkboxes and dropdown option" do
+  test "remove a file from collection using checkbox and dropdown option" do
     visit page_with_token('active', '/collections/zzzzz-4zz18-a21ux3541sxa8sf')
     assert(page.has_text?('file1'), 'file not found - file1')
-    assert(page.has_text?('file2'), 'file not found - file2')
 
-    # now in collection page
-    # remove first file from both subdirs
+    # remove first file
     input_files = page.all('input[type=checkbox]')
     input_files[0].click
 
@@ -314,26 +312,32 @@ class CollectionsTest < ActionDispatch::IntegrationTest
       click_link 'Remove selected files'
     end
 
-    # now in the newly created collection page
-    assert(page.has_no_text?('file1'), 'file not found - file')
+    assert(page.has_no_text?('file1'), 'file found - file')
     assert(page.has_text?('file2'), 'file not found - file2')
   end
 
-  test "remove a collection file using trash icon" do
+  test "remove a file in collection using trash icon" do
     need_selenium 'to confirm remove'
 
     visit page_with_token('active', '/collections/zzzzz-4zz18-a21ux3541sxa8sf')
     assert(page.has_text?('file1'), 'file not found - file1')
-    assert(page.has_text?('file2'), 'file not found - file2')
 
-    # now in collection page
     first('.fa-trash-o').click
-    alert = page.driver.browser.switch_to.alert
-    alert.accept
-    wait_for_ajax
+    page.driver.browser.switch_to.alert.accept
 
-    # now in the newly created collection page
-    assert(page.has_no_text?('file1'), 'file not found - file')
+    assert(page.has_no_text?('file1'), 'file found - file')
     assert(page.has_text?('file2'), 'file not found - file2')
   end
+
+  test "rename a file in collection" do
+    visit page_with_token('active', '/collections/zzzzz-4zz18-a21ux3541sxa8sf')
+
+    within('.collection_files') do
+      first('.fa-pencil').click
+      find('.editable-input input').set('file1renamed')
+      find('.editable-submit').click
+    end
+
+    assert(page.has_text?('file1renamed'), 'file not found - file1renamed')
+  end
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list