Commit 93d35479 authored by flothoni's avatar flothoni

scatterplot.js; modify behavior when click in barmode

Now look for ctrl/shift use when a click is detected in bar mode
Link to #3994
parent 94686d8c
......@@ -553,7 +553,7 @@ ScatterPlot.prototype = {
self.m.focusIn(d.id);
})
.on("click", function(d) {
self.m.select(d.id);
self.clickNode(d.id);
})
},
......
# 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