mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Visualizations Registry: update unit test to remove expected visualizations, small fixes
This commit is contained in:
@@ -19,8 +19,6 @@ log = logging.getLogger( __name__ )
|
||||
|
||||
__TODO__ = """
|
||||
BUGS:
|
||||
anon users clicking a viz link gets 'must be' msg in galaxy_main (w/ masthead)
|
||||
should not show visualizations (no icon)?
|
||||
newick files aren't being sniffed prop? - datatype is txt
|
||||
|
||||
have parsers create objects instead of dicts
|
||||
@@ -29,12 +27,9 @@ allow data_sources with no model_class but have tests (isAdmin, etc.)
|
||||
some confused vocabulary in docs, var names
|
||||
tests:
|
||||
anding, grouping, not
|
||||
has_dataprovider
|
||||
user is admin
|
||||
data_sources:
|
||||
lists of
|
||||
add description element to visualization.
|
||||
|
||||
user_pref for ordering/ex/inclusion of particular visualizations
|
||||
"""
|
||||
|
||||
@@ -258,6 +253,7 @@ class VisualizationsRegistry( pluginframework.PageServingPluginManager ):
|
||||
if test_fn( target_object, test_result ):
|
||||
#log.debug( '\t test passed' )
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_visualization_url( self, trans, target_object, visualization_name, param_data ):
|
||||
|
||||
@@ -250,7 +250,7 @@ var HDAEditView = hdaBase.HDABaseView.extend( LoggableMixin ).extend(
|
||||
});
|
||||
|
||||
// No need for popup menu because there's a single visualization.
|
||||
if( _.keys( visualizations ).length === 1 ) {
|
||||
if( visualizations.length === 1 ) {
|
||||
var onlyVisualization = visualizations[0];
|
||||
$icon.attr( 'data-original-title', _l( 'Visualize in ' ) + onlyVisualization.html );
|
||||
$icon.attr( 'href', onlyVisualization.href );
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -49,18 +49,8 @@ class VisualizationsRegistry_TestCase( unittest.TestCase ):
|
||||
template_cache_dir=template_cache_dir )
|
||||
|
||||
expected_plugins_path = os.path.join( glx_dir, vis_reg_path )
|
||||
expected_plugin_names = [
|
||||
'circster',
|
||||
'graphview',
|
||||
'phyloviz',
|
||||
'scatterplot',
|
||||
'sweepster',
|
||||
'trackster',
|
||||
]
|
||||
|
||||
self.assertEqual( plugin_mgr.base_url, 'visualizations' )
|
||||
self.assertItemsEqual( plugin_mgr.directories, [ expected_plugins_path ] )
|
||||
self.assertItemsEqual( plugin_mgr.plugins.keys(), expected_plugin_names )
|
||||
|
||||
scatterplot = plugin_mgr.plugins[ 'scatterplot' ]
|
||||
self.assertEqual( scatterplot.name, 'scatterplot' )
|
||||
|
||||
Reference in New Issue
Block a user