Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit e6f52538 authored by Mikaël Salson's avatar Mikaël Salson

test_multilocus.rb: Add a watir test on the sample report

Who said watir tests are useless? Two unexpected bugs have been caught by making this test
(see the two previous commits).

There definitely should be a watir test on the monitor report.
parent 65f277d5
# coding: utf-8
load 'vidjil_browser.rb'
load 'browser_test.rb'
......@@ -271,6 +272,47 @@ class TestMultilocus < BrowserTest
end
end
def test_14_export_sample_report
assert ($b.scatterplot_x_legend(0).text.include? 'TRB'), "Current system should be TRB"
# Select a clone
$b.clone_in_scatterplot('43').click
$b.menu_item_export('export_sample_report').click
assert ($b.window(:title => "analysis-example.vidjil – helloworld").exists?), ">> Report didn't show up"
$b.window(:title => "analysis-example.vidjil – helloworld").use do
# Check that all loci are there
assert ($b.element(:id => 'segmentation-report').text.include? "TRA"), "TRA should be present"
assert ($b.element(:id => 'segmentation-report').text.include? "TRB"), "TRB should be present"
assert ($b.element(:id => 'segmentation-report').text.include? "TRD"), "TRD should be present"
assert ($b.element(:id => 'segmentation-report').text.include? "IGH"), "IGH should be present"
assert (not $b.element(:id => 'segmentation-report').text.include? "TRG"), "TRG should not be present"
assert (not $b.element(:id => 'segmentation-report').text.include? "IGH+"), "IGH+ should not be present"
assert ($b.element(:class => 'clone_name').text.include? "TRBV13-1*02 -0/1/-0 TRBD1*01 -6/0/-0 TRBJ1-3*01"), "segmentation should be the one provided in the .vidjil file"
n_gene = $b.element(:class => 'n_gene', :index => 0)
# This is true with a 0-based index, which is the case for the vidjil
# JSON version used
assert (n_gene.text == 'A'), ("N1 should be A, it is '" + n_gene.text + "'")
n_gene = $b.element(:class => 'n_gene', :index => 1)
assert (n_gene.text == ''), ("N2 should be empty, it is '" + n_gene.text + "'")
assert($b.element(:class => 'j_gene').text == 'YYGYYTYYAATGTYCYYCCYAG')
assert($b.element(:class => 'v_gene').text == 'YTYTYAYTGGTGCTGGYACCTYAAAYGYYTGYCCTYTGGGYYAGGCYCYYAYACGYAYAYCTYTYCYCTGCTGYATTGGCTYYCCYYAYYYTTTGYCTYTGTGCYGYGTYTGCGGYYTYTGYAAYCGCYYTTTTGYYAGYAGCCGGCY')
end
$b.window(:title => "analysis-example.vidjil – helloworld").close
$b.window(:title => "analysis-example").use
assert ($b.scatterplot_x_legend(0).text.include? 'TRB'), "Current system should not have changed"
assert (not $b.element(:class => 'waiting_msg').present?), "The ``generating report'' message should not be present anymore"
end
def TODO_test_14_edit_tag
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment