spec/spec_helper.rb in sequenceserver-2.0.0.beta3 vs spec/spec_helper.rb in sequenceserver-2.0.0.beta4
- old
+ new
@@ -1,7 +1,8 @@
require 'simplecov'
require 'capybara/rspec'
+require 'capybara-screenshot/rspec'
require 'selenium-webdriver'
require_relative 'download_helper'
# Start SimpleCov.
@@ -28,11 +29,11 @@
# Setup capybara tests.
config.before :context, type: :feature do
Capybara.app = SequenceServer.init
Capybara.server = :webrick
- Capybara.default_max_wait_time = 10
+ Capybara.default_max_wait_time = 30
Capybara.register_driver :selenium do |app|
options = Selenium::WebDriver::Firefox::Options.new
# Run the browser in headless mode.
@@ -41,13 +42,12 @@
# Tell the browser where to save downloaded files.
options.profile = Selenium::WebDriver::Firefox::Profile.new
options.profile['browser.download.dir'] = downloads_dir
options.profile['browser.download.folderList'] = 2
- # Suppress "open with / save" dialog for FASTA, XML, and TSV file types.
+ # Suppress "open with / save" dialog for FASTA, XML, TSV and PNG file types.
options.profile['browser.helperApps.neverAsk.saveToDisk'] =
'text/fasta,text/xml,text/tsv,image/png'
-
Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
end
FileUtils.mkdir_p downloads_dir
end