require 'integration_helper'
class CollectionUploadTest < ActionDispatch::IntegrationTest
- setup do
- Headless.new.start
- end
-
setup do
testfiles.each do |filename, content|
open(testfile_path(filename), 'w') do |io|
end
test "Create new collection using upload button" do
- Capybara.current_driver = :poltergeist
+ need_javascript
visit page_with_token 'active', aproject_path
find('.btn', text: 'Add data').click
click_link 'Upload files from my computer'
end
test "No Upload tab on non-writable collection" do
- Capybara.current_driver = :poltergeist
+ need_javascript
visit(page_with_token 'active',
'/collections/'+api_fixture('collections')['user_agreement']['uuid'])
assert_no_selector '.nav-tabs Upload'
end
test "Upload two empty files with the same name" do
- Capybara.current_driver = :selenium
+ need_selenium "to make file uploads work"
visit page_with_token 'active', sandbox_path
find('.nav-tabs a', text: 'Upload').click
attach_file 'file_selector', testfile_path('empty.txt')
end
test "Upload non-empty files, report errors" do
- Capybara.current_driver = :selenium
+ need_selenium "to make file uploads work"
visit page_with_token 'active', sandbox_path
find('.nav-tabs a', text: 'Upload').click
attach_file 'file_selector', testfile_path('a')
attach_file 'file_selector', testfile_path('foo.txt')
assert_selector 'button:not([disabled])', text: 'Start'
click_button 'Start'
- if "test environment does not have a keepproxy yet, see #4534"
+ if "test environment does not have a keepproxy yet, see #4534" != "fixed"
using_wait_time 20 do
assert_text :visible, 'error'
end