Commit 0c0b01f3 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-c/3994-mecanisme-de-selection-incoherent-en-mode-histogramme-bar' into 'dev'

Resolve "Mécanisme de sélection incohérent en mode histogramme (bar)"

Closes #3994

See merge request !527
parents 94686d8c 9bc95aa4
Pipeline #101789 passed with stages
in 9 minutes and 12 seconds
......@@ -553,7 +553,7 @@ ScatterPlot.prototype = {
self.m.focusIn(d.id);
})
.on("click", function(d) {
self.m.select(d.id);
self.clickNode(d.id);
})
},
......
......@@ -123,8 +123,8 @@ class TestClones < BrowserTest
def test_03_focus
$b.clone_in_scatterplot("1").click
$b.clone_in_scatterplot("18").click
$b.clone_in_scatterplot("19").click
$b.clone_in_scatterplot("18").click(:control)
$b.clone_in_scatterplot("19").click(:control)
$b.a(:id => "focus_selected").click
sleep(1)
# should be hidden
......
# coding: utf-8
load 'vidjil_browser.rb'
load 'browser_test.rb'
#browser test suite
class TestScatterplot < BrowserTest
def setup
super
if not defined? $b
set_browser("/tools/tests/data/fused_multiple.vidjil")
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
# Make upload menu appear to test the application with this menu too
$b.execute_script("$('#upload_summary')[0].style.display='block';")
end
end
def after_tests
end
##############
### CLONES ###
##############
# id 0 --> biggest clone, IGHV1, IGHJ1, _average_read_length==162
# id 15/16 --> other clone (TRD, IGH)
# id 18 --> lenSeqAverage/_average_read_length == 162
# id 27 --> lenCDR3 (undefined), represent all clones
# id 29 --> seg5; seg3 (IGHV1; IGHJ1)
def test_01_multiple_select_barmode
$b.send_keys 4
sleep 1
# to verify correct selection, We will look in semgenter the presence if clone entrie
# Maybe another method could be more acurate
$b.clone_in_list("0").click
assert ( $b.clone_in_segmenter('0').exists? ), ">> Firste click; Correct selection of clone 0 by click in scatterplot"
assert ( not $b.clone_in_segmenter('1').exists? ), ">> Firste click; Clone 1 should not be present in segmenter"
$b.clone_in_list("1").click
assert ( not $b.clone_in_segmenter('0').exists? ), ">> Another click; Clone 0 should not be present anymore in segmenter"
assert ( $b.clone_in_segmenter('1').exists? ), ">> Another click; Correct selection of clone 1 after second click in scatterplot"
$b.clone_in_list("0").click(:control)
assert ( $b.clone_in_segmenter('0').exists? ), ">> ctrl+click; Clone 0 should be present in segmenter"
assert ( $b.clone_in_segmenter('1').exists? ), ">> ctrl+click; Clone 1 should be present in segmenter"
end
def test_02_multiple_select_bubble
$b.send_keys 1
sleep 1
# to verify correct selection, We will look in semgenter the presence if clone entrie
# Maybe another method could be more acurate
$b.clone_in_list("0").click
assert ( $b.clone_in_segmenter('0').exists? ), ">> Firste click; Correct selection of clone 0 by click in scatterplot"
assert ( not $b.clone_in_segmenter('1').exists? ), ">> Firste click; Clone 1 should not be present in segmenter"
$b.clone_in_list("1").click
assert ( not $b.clone_in_segmenter('0').exists? ), ">> Another click; Clone 0 should not be present anymore in segmenter"
assert ( $b.clone_in_segmenter('1').exists? ), ">> Another click; Correct selection of clone 1 after second click in scatterplot"
$b.clone_in_list("0").click(:control)
assert ( $b.clone_in_segmenter('0').exists? ), ">> ctrl+click; Clone 0 should be present in segmenter"
assert ( $b.clone_in_segmenter('1').exists? ), ">> ctrl+click; Clone 1 should be present in segmenter"
end
# Not really a test
def test_zz_close
close_everything
end
end
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