X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/27ba0e2e0733ddaeb7437dc4194f684306636635..2ed8d670a5d6f93eed57cb14138323cc835e027f:/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..1edfc10505 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 'input', text: 'Create sharing link' + 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 'input', text: 'Create sharing link' within "#sharing-button" do check_sharing(:on, download_link_re) check_sharing(:off, download_link_re)