Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 48b53b40 authored by Mikaël Salson's avatar Mikaël Salson

vidjil_browser.rb: Move IDs to specific functions

This allows to reuse the main code, even with different IDs
parent c59937b6
...@@ -116,7 +116,7 @@ class VidjilBrowser < Watir::Browser ...@@ -116,7 +116,7 @@ class VidjilBrowser < Watir::Browser
# Return the div containing the information (status bar) # Return the div containing the information (status bar)
def infoline def infoline
return div(:id => 'bot-container').div(:class => 'focus') return div(:id => segmenter_id).div(:class => 'focus')
end end
# Return the span of the locus # Return the span of the locus
...@@ -234,7 +234,7 @@ class VidjilBrowser < Watir::Browser ...@@ -234,7 +234,7 @@ class VidjilBrowser < Watir::Browser
# Return the div containing stats information on selected clone(s) # Return the div containing stats information on selected clone(s)
def statsline def statsline
div(:id => 'bot-container').div(:class => 'stats') div(:id => segmenter_id).div(:class => 'stats')
end end
# Return an item from a tag selector split in a hash. # Return an item from a tag selector split in a hash.
...@@ -292,10 +292,18 @@ class VidjilBrowser < Watir::Browser ...@@ -292,10 +292,18 @@ class VidjilBrowser < Watir::Browser
return div(:id => 'list_clones') return div(:id => 'list_clones')
end end
private protected
def scatterplot_id
return 'visu_axis'
end
def segmenter_id
return 'bot-container'
end
def scatterplot(axis) def scatterplot(axis)
return element(:id => 'visu_axis_'+axis+'_container') return element(:id => scatterplot_id+'_'+axis+'_container')
end end
def scatterplot_legend(axis, index) def scatterplot_legend(axis, index)
......
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