Commit b73da9f2 authored by Mathieu Giraud's avatar Mathieu Giraud

browser_test.rb, tests: further extract and use skip_on_browser

parent c23fd31a
Pipeline #199810 passed with stages
in 28 minutes and 25 seconds
......@@ -29,7 +29,7 @@ class BrowserTest < MiniTest::Test
# Skip a test on a given browser version
def skip_on_browser(name, version, message)
if $b.driver.capabilities.browser_name == name
if $b.driver.capabilities.version == version
if version == nil or $b.driver.capabilities.version == version
nameversion = "(" + $b.driver.capabilities.browser_name + "/" + $b.driver.capabilities.version + ")"
print nameversion
skip message + " " + nameversion
......
......@@ -17,9 +17,7 @@ class TestExport < BrowserTest
# If only one sample, the button report monitor should be disable
set_browser("/doc/analysis-example1.vidjil")
if $b.driver.capabilities.browser_name == 'chrome'
skip "Issue #3699 must be solved first"
end
skip_on_browser('chrome', nil, 'Issue #3699 must be solved first')
$b.menu_item_export('export_sample_report')
assert ( $b.a(:id => "export_monitor_report", :class => 'disabledClass').exists?), ">> export monitor is disable if only one samples is open"
......@@ -30,9 +28,7 @@ class TestExport < BrowserTest
# If only one sample, the button report monitor should be enable
set_browser("/doc/analysis-example.vidjil")
if $b.driver.capabilities.browser_name == 'chrome'
skip "Issue #3699 must be solved first"
end
skip_on_browser('chrome', nil, 'Issue #3699 must be solved first')
$b.menu_item_export('export_sample_report')
assert (not $b.a(:id => "export_monitor_report", :class => 'disabledClass').exists?), ">> export monitor available if 2 samples are present"
......
......@@ -229,9 +229,7 @@ class TestMultilocus < BrowserTest
def test_14_export_sample_report
if $b.driver.capabilities.browser_name == 'chrome'
skip "Issue #3699 must be solved first"
end
skip_on_browser('chrome', nil, 'Issue #3699 must be solved first')
assert ($b.scatterplot_x_legend(0).text.include? 'TRB'), "Current system should be TRB"
......@@ -274,9 +272,7 @@ class TestMultilocus < BrowserTest
def test_14b_export_sample_report
if $b.driver.capabilities.browser_name == 'chrome'
skip "Issue #3699 must be solved first"
end
skip_on_browser('chrome', nil, 'Issue #3699 must be solved first')
# Select a clone
$b.clone_in_scatterplot('43').click
......
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