4054: show email address in sharing tab and update test to verify.
[arvados.git] / apps / workbench / test / integration / projects_test.rb
index 189de02f7cf3ad26957195cfec69d16739a250a1..e86f45a7c4216b78d71c5892e79fd5db0714eb09 100644 (file)
@@ -161,7 +161,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest
     end
     wait_for_ajax
 
-    click_link 'Move to project...'
+    click_link 'Move project...'
     find('.selectable', text: 'Project 1234').click
     find('.modal-footer a,button', text: 'Move').click
     wait_for_ajax
@@ -182,7 +182,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest
     find('#project_sharing').all('tr')
   end
 
-  def add_share_and_check(share_type, name)
+  def add_share_and_check(share_type, name, obj=nil)
     assert(page.has_no_text?(name), "project is already shared with #{name}")
     start_share_count = share_rows.size
     click_on("Share with #{share_type}")
@@ -194,6 +194,9 @@ class ProjectsTest < ActionDispatch::IntegrationTest
       find(".selectable", text: name).click
       assert(has_no_selector?(".modal-dialog-preview-pane"),
              "preview pane available in sharing dialog")
+      if share_type == 'users'
+        assert(page.has_text?(obj['email']), "Did not find user's email")
+      end
       assert_raises(Capybara::ElementNotFound,
                     "Projects pulldown available from sharing dialog") do
         click_on "All projects"
@@ -240,7 +243,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest
 
     show_project_using("active")
     click_on "Sharing"
-    add_share_and_check("users", new_name)
+    add_share_and_check("users", new_name, add_user)
     modify_share_and_check(new_name)
   end