X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/19ae770973482257117fe8ded5619c3018c4b60f..1bfda34f36f2cf2064460f169f195fa5b2fe305a:/apps/workbench/test/integration/collection_upload_test.rb diff --git a/apps/workbench/test/integration/collection_upload_test.rb b/apps/workbench/test/integration/collection_upload_test.rb index 903df90fb4..552a9cd5e8 100644 --- a/apps/workbench/test/integration/collection_upload_test.rb +++ b/apps/workbench/test/integration/collection_upload_test.rb @@ -41,6 +41,9 @@ class CollectionUploadTest < ActionDispatch::IntegrationTest test "Upload two empty files with the same name" do need_selenium "to make file uploads work" visit page_with_token 'active', sandbox_path + + unlock_collection + find('.nav-tabs a', text: 'Upload').click attach_file 'file_selector', testfile_path('empty.txt') assert_selector 'div', text: 'empty.txt' @@ -55,6 +58,9 @@ class CollectionUploadTest < ActionDispatch::IntegrationTest test "Upload non-empty files" do need_selenium "to make file uploads work" visit page_with_token 'active', sandbox_path + + unlock_collection + find('.nav-tabs a', text: 'Upload').click attach_file 'file_selector', testfile_path('a') attach_file 'file_selector', testfile_path('foo.txt') @@ -93,6 +99,9 @@ class CollectionUploadTest < ActionDispatch::IntegrationTest service_port: 99999) end visit page_with_token 'active', sandbox_path + + unlock_collection + find('.nav-tabs a', text: 'Upload').click attach_file 'file_selector', testfile_path('foo.txt') assert_selector 'button:not([disabled])', text: 'Start' @@ -128,4 +137,9 @@ class CollectionUploadTest < ActionDispatch::IntegrationTest # Must be an absolute path. https://github.com/jnicklas/capybara/issues/621 File.join Dir.getwd, 'tmp', filename end + + def unlock_collection + first('.lock-collection-btn').click + accept_alert + end end