Sha256: a72b87ea719738f12d3f7a3814472ab96ab64a2fc0966d3fafccdb7ec8fe4397
Contents?: true
Size: 1.43 KB
Versions: 15
Compression:
Stored size: 1.43 KB
Contents
require 'spec_helper' require 'capybara/rspec' require 'capybara-webkit' describe 'a browser', :js => true do sequence = 'ATCGATCAGCTACGATCAGCATCGACTAGCATCGACTACGA' sample_nucl_db = 'Sinvicta2-2-3.cdna.subset.fasta' # sample_prot_db = 'Sinvicta2-2-3.prot' before(:all) do Capybara.javascript_driver = :webkit Capybara.default_wait_time = 5 options = { :database_dir => SequenceServer.root } Capybara.app = SequenceServer.init(options) end it 'runs a simple blastn search' do visit '/' fill_in('sequence', :with => sequence) check(sample_nucl_db) click_button('method') page.should have_content('Query') end it 'properly controls blast button' do visit '/' fill_in('sequence', :with => sequence) page.evaluate_script("$('#method').is(':disabled')").should eq(true) check(sample_nucl_db) page.evaluate_script("$('#method').is(':disabled')").should eq(false) end it 'properly controls interaction with database listing' do visit '/' fill_in('sequence', :with => sequence) check(sample_nucl_db) page.evaluate_script("$('.protein .checkbox').first().hasClass('disabled')") .should eq(true) end it 'shows a dropdown menu when other blast methods are available' do visit '/' fill_in('sequence', :with => sequence) check(sample_nucl_db) page.save_screenshot('screenshot.png') page.has_css?('button.dropdown-toggle').should eq(true) end end
Version data entries
15 entries across 15 versions & 1 rubygems