Skip to content

Commit 4497343

Browse files
authored
Merge pull request #604 from dpavam/Skip-capybara-tests
Skips capybara tests if geckodriver is not installed.
2 parents d27c15c + f5db2a4 commit 4497343

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

public/css/sequenceserver.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/capybara_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
expect(File.basename(downloaded_file)).to eq('sequenceserver-xml_report.xml')
202202
clear_downloads
203203
end
204-
204+
205205
it 'can show hit sequences in a modal' do
206206
# Do a BLASTP search. protein_query refers to the first two sequence in
207207
# protein_databases[0], so the top hits are the query sequences themselves.

spec/spec_helper.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@
2727
# For file downloading.
2828
config.include DownloadHelpers, type: :feature
2929

30+
# Check if geckodriver is installed for capybara tests.
31+
def geckodriver_installed?
32+
# geckodriver 0.31.0
33+
system('geckodriver -V')
34+
end
35+
3036
# Setup capybara tests.
31-
config.before :context, type: :feature do
37+
config.before :context, type: :feature do |context|
38+
context.skip('Install geckodriver first. Try: sudo apt install firefox-geckodriver.') unless geckodriver_installed?
3239
Capybara.app = SequenceServer
3340
Capybara.server = :webrick
3441
Capybara.default_max_wait_time = 30

0 commit comments

Comments
 (0)