X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ef09ad4c9162eaf913e1a9bb65991b87116e40c0..a2fc3a2158c3c154c3d7fc2b55eea928898cafb5:/apps/workbench/test/integration/anonymous_access_test.rb diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb index b51730bd95..4447bd3596 100644 --- a/apps/workbench/test/integration/anonymous_access_test.rb +++ b/apps/workbench/test/integration/anonymous_access_test.rb @@ -22,6 +22,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest assert_text 'indicate that you have read and accepted the user agreement' end within('.navbar-fixed-top') do + assert_selector 'a', text: Rails.configuration.site_name.downcase assert_selector 'a', text: "#{user['email']}" find('a', text: "#{user['email']}").click within('.dropdown-menu') do @@ -31,6 +32,8 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest else # anonymous assert_text 'Unrestricted public data' within('.navbar-fixed-top') do + assert_text Rails.configuration.site_name.downcase + assert_no_selector 'a', text: Rails.configuration.site_name.downcase assert_selector 'a', text: 'Log in' end end @@ -137,6 +140,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest within first('tr', text: look_for) do click_link 'Show' end + assert_text 'Public Projects Unrestricted public data' assert_text 'script_version' assert_text 'zzzzz-tpzed-xurymjxw79nv3jz' # modified by user @@ -153,6 +157,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest end # in pipeline instance page + assert_text 'Public Projects Unrestricted public data' assert_text 'This pipeline is complete' assert_no_selector 'a', text: 'Re-run with latest' assert_no_selector 'a', text: 'Re-run options' @@ -173,7 +178,18 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest end # in template page + assert_text 'Public Projects Unrestricted public data' assert_text 'script version' assert_no_selector 'a', text: 'Run this pipeline' 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