X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2be95ce7f069d9eb131b0d2d922a5e556f75810c..d104886f95ab9bf0712873c809410b34f8bed031:/apps/workbench/test/integration/collections_test.rb diff --git a/apps/workbench/test/integration/collections_test.rb b/apps/workbench/test/integration/collections_test.rb index e7b27fff86..4d6489d4aa 100644 --- a/apps/workbench/test/integration/collections_test.rb +++ b/apps/workbench/test/integration/collections_test.rb @@ -41,11 +41,19 @@ class CollectionsTest < ActionDispatch::IntegrationTest send(link_assertion, all("a").select { |a| a[:href] =~ link_regexp }) end + test "Hides sharing link button when configured to do so" do + Rails.configuration.Workbench.DisableSharingURLsUI = true + coll_uuid = api_fixture("collections", "collection_owned_by_active", "uuid") + visit page_with_token("active_trustedclient", "/collections/#{coll_uuid}") + assert_no_selector 'div#sharing-button' + end + test "creating and uncreating a sharing link" do coll_uuid = api_fixture("collections", "collection_owned_by_active", "uuid") download_link_re = Regexp.new(Regexp.escape("/c=#{coll_uuid}/")) visit page_with_token("active_trustedclient", "/collections/#{coll_uuid}") + assert_selector 'div#sharing-button' within "#sharing-button" do check_sharing(:on, download_link_re) check_sharing(:off, download_link_re)