Commit 3f27ec73 authored by flothoni's avatar flothoni
Browse files

functional tests; refactor tooltip container close

Now, tooltip container is close directly by set_browser function
parent 82d39914
Pipeline #190336 failed with stages
in 20 seconds
......@@ -26,7 +26,7 @@ class BrowserTest < MiniTest::Test
end
end
def set_browser(vidjil_file, analysis_file=nil, local_storage=nil)
def set_browser(vidjil_file, analysis_file=nil, local_storage=nil, close_tooltip=true)
folder_path = File.expand_path(File.dirname(__FILE__))
folder_path.sub! '/browser/test/functional', ''
index_path = 'file://' + folder_path + '/browser/index.html'
......@@ -105,6 +105,11 @@ class BrowserTest < MiniTest::Test
$b.div(:id => 'file_menu').button(:text => 'start').click
# close tooltip
if close_tooltip and $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
end
def close_everything
......
......@@ -9,9 +9,6 @@ class TestGraph < BrowserTest
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';")
......
......@@ -9,9 +9,6 @@ class TestGraph < BrowserTest
super
if not defined? $b
set_browser("")
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
end
end
......
......@@ -9,9 +9,6 @@ class TestGraph < BrowserTest
super
if not defined? $b
set_browser("/browser/test/data/issues/4422.vidjil")
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
end
end
......
......@@ -9,10 +9,6 @@ class TestGraph < BrowserTest
super
if not defined? $b
set_browser("/browser/test/data/issues/4472.vidjil")
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
end
end
......
......@@ -7,9 +7,6 @@ class TestSimple < BrowserTest
super
if not defined? $b
set_browser("/doc/analysis-example1.vidjil")
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
end
end
......
......@@ -9,9 +9,6 @@ class TestClones < BrowserTest
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';")
......
......@@ -9,9 +9,6 @@ class TestCluster < BrowserTest
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
end
end
......
......@@ -9,9 +9,6 @@ class TestGraph < BrowserTest
super
if not defined? $b
set_browser("/doc/analysis-example2.vidjil")
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
end
end
......
......@@ -9,9 +9,6 @@ class TestInfo < BrowserTest
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';")
......
......@@ -9,9 +9,6 @@ class TestList < BrowserTest
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
end
end
......
......@@ -8,9 +8,6 @@ class TestLoadingAnalysis < BrowserTest
if not defined? $b
set_browser("/doc/analysis-example2.vidjil", "/doc/analysis-example2.analysis")
$b.clone_in_scatterplot('0').wait_until(&:present?)
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
end
end
......
......@@ -9,9 +9,6 @@ class TestMultilocus < BrowserTest
super
if not defined? $b
set_browser("/doc/analysis-example.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';")
......
......@@ -9,9 +9,6 @@ class TestNormalization < BrowserTest
super
if not defined? $b
set_browser("/doc/analysis-example.vidjil")
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
end
end
......
......@@ -9,9 +9,6 @@ class TestScatterplot < BrowserTest
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';")
......
......@@ -10,9 +10,6 @@ class TestGraph < BrowserTest
super
if not defined? $b
set_browser("/doc/analysis-example2.vidjil", nil, {"timeFormat" => "short_name" })
if $b.div(id: 'tip-container').present?
$b.div(:id => 'tip-container').div(:class => 'tip_1').element(:class => 'icon-cancel').click
end
end
end
......
......@@ -9,10 +9,6 @@ class TestClones < BrowserTest
super
if not defined? $b
set_browser("/demo/Demo-X5-no-clone.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
......
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