5824: Merge branch 'master' into 5824-keep-web
[arvados.git] / apps / workbench / test / integration / anonymous_access_test.rb
index 8ac3a56cb42abd1983e15d621541c3cb158df85d..aabbf00dc206e77090d1d9096c3abed23eec8530 100644 (file)
@@ -19,9 +19,12 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
         assert_text 'Unrestricted public data'
         assert_selector 'a', text: 'Projects'
         page.find("#projects-menu").click
-        assert_selector 'a', text: 'Add a new project'
-        assert_selector 'a', text: 'Browse public projects'
-        assert page.has_text?('Projects shared with me'), 'Not found text - Project shared with me'
+        within('.dropdown-menu') do
+          assert_selector 'a', text: 'Search all projects'
+          assert_selector "a[href=\"/projects/public\"]", text: 'Browse public projects'
+          assert_selector 'a', text: 'Add a new project'
+          assert_selector 'li[class="dropdown-header"]', text: 'My projects'
+        end
       else
         assert_text 'indicate that you have read and accepted the user agreement'
       end
@@ -310,14 +313,4 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
       end
     end
   end
-
-  test "anonymous user accesses collection in shared project" do
-    visit "/collections/#{api_fixture('collections')['public_text_file']['uuid']}"
-
-    # in collection page
-    assert_text 'Public Projects Unrestricted public data'
-    assert_text 'Hello world'
-    assert_text 'Content address'
-    assert_selector 'a', text: 'Provenance graph'
-  end
 end