X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/40df5992d4d8071a6e10a20ecdeb0470a80764cc..27697133a18371d692d69569659dd522e7b0fbdd:/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 8ac8fe4fb3..19720cb752 100644 --- a/apps/workbench/test/integration/collections_test.rb +++ b/apps/workbench/test/integration/collections_test.rb @@ -13,19 +13,17 @@ class CollectionsTest < ActionDispatch::IntegrationTest page.assert_no_selector "div[data-persistent-state='#{oldstate}']" end - ['/collections', '/users/welcome'].each do |path| - test "Flip persistent switch at #{path}" do - Capybara.current_driver = Capybara.javascript_driver - uuid = api_fixture('collections')['foo_file']['uuid'] - visit page_with_token('active', path) - within "tr[data-object-uuid='#{uuid}']" do - change_persist 'cache', 'persistent' - end - # Refresh page and make sure the change was committed. - visit current_path - within "tr[data-object-uuid='#{uuid}']" do - change_persist 'persistent', 'cache' - end + test "Flip persistent switch at /collections" do + Capybara.current_driver = Capybara.javascript_driver + uuid = api_fixture('collections')['foo_file']['uuid'] + visit page_with_token('active', '/collections') + within "tr[data-object-uuid='#{uuid}']" do + change_persist 'cache', 'persistent' + end + # Refresh page and make sure the change was committed. + visit current_path + within "tr[data-object-uuid='#{uuid}']" do + change_persist 'persistent', 'cache' end end @@ -74,4 +72,10 @@ class CollectionsTest < ActionDispatch::IntegrationTest assert_equal(['foo'], hrefs.compact.sort, "download page did provide strictly file links") end + + test "can view empty collection" do + uuid = 'd41d8cd98f00b204e9800998ecf8427e+0' + visit page_with_token('active', "/collections/#{uuid}") + assert page.has_text?('This collection is empty') + end end