6604- Disabled SSH public key notification when shell_in_a_box_url
[arvados.git] / apps / workbench / test / integration / application_layout_test.rb
index b6a501f924e690012d2b3f96a646ccb857c743a3..3a8717f8811f1b75d492fa5451e81551ae6fd3ca 100644 (file)
@@ -24,6 +24,8 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       else
         assert page.has_link?("Projects"), 'Not found link - Projects'
         page.find("#projects-menu").click
+        assert_selector 'a', text: 'Add a new project'
+        assert_no_selector 'a', text: 'Browse public projects'
         assert page.has_text?('Projects shared with me'), 'Not found text - Project shared with me'
       end
     elsif invited
@@ -199,4 +201,12 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       assert page.has_link?('Report a problem ...'), 'No link - Report a problem'
     end
   end
+
+  test "no SSH public key notification when shell_in_a_box_url is configured" do
+    Rails.configuration.shell_in_a_box_url = 'example.com'
+    visit page_with_token('job_reader')
+    click_link 'notifications-menu'
+    assert page.has_no_link?('Click here to set up an SSH public key for use with Arvados.')
+    assert page.has_link?('Click here to learn how to run an Arvados Crunch pipeline')
+  end
 end