Commit d06de6d0 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-c/open_clone_by_dblclick' into 'dev'

scatterplot.js; open clone when a double click is done on clone bubble

See merge request !769
parents 287ec2ba d2a2b48b
Pipeline #169477 passed with stages
in 13 minutes and 25 seconds
......@@ -213,7 +213,8 @@ ScatterPlot.prototype = {
.attr("id", function(d) {
return self.id + "_circle" + d.id;
})
.attr("class", "circle_hidden")
.attr("class", "circle_hidden")
.on("dblclick",function(d){ self.m.displayInfoBox(d.id) });
},
......
......@@ -58,7 +58,7 @@ class ExternalTest < BrowserTest
$b.until { $b.segmenter_checkbox_imgt_vdj.present? }
clone_info = $b.clone_info_segmenter('25')
productive_title = clone_info[:axis].element(:class => 'productivity IMGT').title
productive_title = clone_info[:axis].element(:class => ['productivity', 'IMGT']).title
assert (productive_title.include? 'productivity'), "IMGT should tell us the productivity of the sequence"
clone_segmenter = $b.clone_in_segmenter('25')
......
......@@ -31,7 +31,7 @@ GGGGGAGGCTTGGTACAGCCTGGGGGGTCCCTGAGACTCTCCTGTGCAGCCTCTGGATTCACCTTCAGTAGCTACGACAT
Watir::Wait.until(timeout: 10) { $b.span(:class => "identityBad").exists? }
clone_info = $b.clone_info_segmenter('0')
clone_info[:identity].element(:text => "NaN%").wait_while(&:present?)
productive_title = clone_info[:axis].element(:class => 'productivity IMGT').title
productive_title = clone_info[:axis].element(:class => ['productivity', 'IMGT']).title
assert (productive_title.include? 'productivity'), "IMGT should tell us the productivity of the sequence"
clone_segmenter = $b.clone_in_segmenter('0')
......
......@@ -54,8 +54,6 @@ class TestScatterplot < BrowserTest
$b.update_icon.wait_while(&:present?)
assert ( $b.clone_in_segmenter('0').present? ), ">> ctrl+click; Clone 0 should be present in segmenter"
assert ( $b.clone_in_segmenter('1').present? ), ">> ctrl+click; Clone 1 should be present in segmenter"
end
def test_02_multiple_select_bubble
......@@ -81,10 +79,9 @@ class TestScatterplot < BrowserTest
$b.update_icon.wait_while(&:present?)
assert ( $b.clone_in_segmenter('0').present? ), ">> ctrl+click; Clone 0 should be present in segmenter"
assert ( $b.clone_in_segmenter('1').present? ), ">> ctrl+click; Clone 1 should be present in segmenter"
end
def test_03_update_radius
$b.menu_filter.click
$b.update_icon.wait_while(&:present?)
......@@ -121,6 +118,29 @@ class TestScatterplot < BrowserTest
assert ( axis[3].text == "0.01" ), ">> incorrect fourth legend, got '" + axis[3].text + "', expected '0.01'"
end
def test_07_open_click_by_dblclick
## reset, time 0, preset 0
$b.send_keys 0
$b.graph_x_legend("0").fire_event('click')
$b.update_icon.wait_while(&:present?)
## open a first time the modal (init style and content); and close it
modal = $b.modal_container
c0 = $b.clone_in_list("0")
c0.span(:class => ["infoBox", "warn"]).click
modal.i(:class => "icon-cancel").click
## verify that clone window is close before
assert ( modal.style == "display: none;" ), "before dblclick, modal is closed"
## verify that clone window is open after
$b.clone_in_scatterplot("1").double_click
$b.update_icon.wait_while(&:present?)
assert ( modal.style == "display: block;" ), "after dblclick, modal is opened"
## Verify that content is related to correct clone
assert ( modal.h2(:text => "Cluster info : T2 - IGHV1*01 0//0 IGHJ1*01").present? ), "Correct title content for modal"
end
# Not really a test
def test_zz_close
......
......@@ -399,6 +399,10 @@ class VidjilBrowser < Watir::Browser
return div(:id => 'updateIcon')
end
def modal_container
return div(:class => ["modal", "info-container"])
end
protected
def scatterplot_id(number=1)
......
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