Commit 30a7d5bc authored by Thonier Florian's avatar Thonier Florian

functional tests; add some tests on cluster show/hide

Link to #3951
parent e8075b79
Pipeline #87799 failed with stages
in 4 minutes and 45 seconds
# coding: utf-8
load 'vidjil_browser.rb'
load 'browser_test.rb'
#browser test suite
class TestMultilocus < BrowserTest
def setup
super
if not defined? $b
set_browser("/doc/analysis-example2.vidjil", "/doc/analysis-example2.analysis")
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
def test_00_list_clones
assert( $b.div(id: 'cluster1').exists?), " cluster1 exist"
assert( $b.div(id: 'cluster1').style.display == "none"), " cluster1 is not display"
end
def test_01_cluster_show
$b.div(id: 'clusterBox_1').click
assert($b.div(id: 'cluster1').style.display != "none"), " cluster1 is display"
end
def test_02_cluster_hide
$b.div(id: 'clusterBox_1').click
assert($b.div(id: 'cluster1').style.display == "none"), " cluster1 is display"
end
def test_03_cluster_show_all
$b.list_cluster_split.click
assert($b.div(id: 'cluster1').style.display != "none"), " cluster1 is not display"
# segmenter_also_show
$b.clone_in_scatterplot('2').click
assert ( $b.clone_in_segmenter('2').exists? ), ">> selected clone is present into the segmenter"
assert ( $b.clone_in_segmenter('3').exists? ), ">> The second clone of the clustr of selected clone is also show"
end
def test_04_cluster_hide_all
$b.list_cluster_unsplit.click
assert (not $b.clone_in_segmenter('3').exists? ), ">> The second clone of the clustr is hidden"
end
# Not really a test
def test_zz_close
close_everything
end
end
......@@ -401,4 +401,12 @@ class VidjilBrowser < Watir::Browser
end
def list_cluster_split()
return div(:id => 'list_split_all')
end
def list_cluster_unsplit()
return div(:id => 'list_unsplit_all')
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