Commit 6cbb7dd8 authored by Mathieu Giraud's avatar Mathieu Giraud

browser_test.rb, tutorial: extract and factorize skip_on_browser()

parent 87b6f930
......@@ -26,6 +26,17 @@ class BrowserTest < MiniTest::Test
end
end
# 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
nameversion = "(" + $b.driver.capabilities.browser_name + "/" + $b.driver.capabilities.version + ")"
print nameversion
skip message + " " + nameversion
end
end
end
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', ''
......
......@@ -702,12 +702,8 @@ and the $y$ axis selects the order of the boxes sharing a same $x$).
In the bar plot mode, pass the mouse over the bars: What happens?}
\begin{verbatim}
def test_B_clones_28_switch_scatterplot_mode
if $b.driver.capabilities.browser_name == 'firefox'
if $b.driver.capabilities.version == '32.0'
print "\n ** Skip test; browser " + $b.driver.capabilities.browser_name + "; " + $b.driver.capabilities.version + " **\n"
skip "Issue #4595 must be solved first"
end
end
skip_on_browser('firefox', '32.0', 'See issue #4595')
$b.send_keys 0
$b.update_icon.wait_while(&:present?)
......@@ -742,11 +738,7 @@ In the bar plot mode, pass the mouse over the bars: What happens?}
\begin{verbatim}
def test_B_clones_29_shortcut_preset
if $b.driver.capabilities.browser_name == 'firefox'
if $b.driver.capabilities.version == '32.0'
skip "Issue #4595 must be solved first"
end
end
skip_on_browser('firefox', '32.0', 'See issue #4595')
$b.send_keys 0
$b.update_icon.wait_while(&:present?)
......
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