diff --git a/config/plugins/visualizations/charts/static/app.js b/config/plugins/visualizations/charts/static/app.js index 1c8ecc7b93e..1edfee691ec 100644 --- a/config/plugins/visualizations/charts/static/app.js +++ b/config/plugins/visualizations/charts/static/app.js @@ -51,7 +51,6 @@ return Backbone.View.extend( // append views this.$el.append(this.viewer_view.$el); this.$el.append(this.editor_view.$el); - this.$el.css('height', 'inherit'); // pick start screen if (!this.storage.load()) { diff --git a/config/plugins/visualizations/charts/static/charts/nvd3/config.js b/config/plugins/visualizations/charts/static/charts/nvd3/config.js index 605dec03627..1dd630d816f 100644 --- a/config/plugins/visualizations/charts/static/charts/nvd3/config.js +++ b/config/plugins/visualizations/charts/static/charts/nvd3/config.js @@ -1,15 +1,15 @@ define([], function() { return { - title : '', - library : 'nvd3.js', - element : 'svg', + title : '', + library : 'nvd3.js', + element : 'svg', columns : { y : { title : 'Values for y-axis' } }, - settings : { + settings : { separator_label : { title : 'X axis', type : 'separator' diff --git a/config/plugins/visualizations/charts/static/charts/nvd3_piechart/config.js b/config/plugins/visualizations/charts/static/charts/nvd3_piechart/config.js index a3dba7865ee..9ff09be93f4 100644 --- a/config/plugins/visualizations/charts/static/charts/nvd3_piechart/config.js +++ b/config/plugins/visualizations/charts/static/charts/nvd3_piechart/config.js @@ -1,7 +1,18 @@ -define(['plugin/charts/nvd3/config'], function(nvd3_config) { +define([], function() { -return $.extend(true, {}, nvd3_config, { - title : 'Pie chart', -}); +return { + title : 'Pie chart', + library : 'nvd3.js', + element : 'svg', + columns : { + label : { + title : 'Labels', + any_type : true + }, + y : { + title : 'Values' + } + } +}; }); \ No newline at end of file diff --git a/config/plugins/visualizations/charts/static/charts/nvd3_piechart/nvd3_piechart.js b/config/plugins/visualizations/charts/static/charts/nvd3_piechart/nvd3_piechart.js index a98498f0597..b6bdd02b2a4 100644 --- a/config/plugins/visualizations/charts/static/charts/nvd3_piechart/nvd3_piechart.js +++ b/config/plugins/visualizations/charts/static/charts/nvd3_piechart/nvd3_piechart.js @@ -27,29 +27,29 @@ return Backbone.View.extend( for (var key in group.values) { var value = group.values[key]; pie_data.push ({ - key : value.x, - y : value.y + y : value.y, + x : value.label }); } - - // add graph to screen - nv.addGraph(function() { - self.chart_3d = nv.models.pieChart() - .donut(true) - .showLegend(false); - - self.options.canvas.datum(pie_data) - .call(self.chart_3d); - - nv.utils.windowResize(self.chart_3d.update); - - // set chart state - chart.state('ok', 'Pie chart drawn.'); - - // unregister process - chart.deferred.done(process_id); - }); } + + // add graph to screen + nv.addGraph(function() { + self.chart_3d = nv.models.pieChart() + .donut(true) + .showLegend(false); + + self.options.canvas.datum(pie_data) + .call(self.chart_3d); + + nv.utils.windowResize(self.chart_3d.update); + + // set chart state + chart.state('ok', 'Chart has been drawn.'); + + // unregister process + chart.deferred.done(process_id); + }); }); } }); diff --git a/config/plugins/visualizations/charts/static/library/deferred.js b/config/plugins/visualizations/charts/static/library/deferred.js index 26690a9ca67..3666af7c79c 100644 --- a/config/plugins/visualizations/charts/static/library/deferred.js +++ b/config/plugins/visualizations/charts/static/library/deferred.js @@ -59,17 +59,19 @@ return Backbone.Model.extend( // unregister process done: function(id) { - // delete tag - delete this.process[id]; - - // decrease process counter - this.counter--; - - // log - console.debug('Deferred:done() - Unregistering ' + id); - - // trigger change - this.trigger('refresh'); + if (this.process[id]) { + // delete tag + delete this.process[id]; + + // decrease process counter + this.counter--; + + // log + console.debug('Deferred:done() - Unregistering ' + id); + + // trigger change + this.trigger('refresh'); + } }, // ready diff --git a/config/plugins/visualizations/charts/static/views/group.js b/config/plugins/visualizations/charts/static/views/group.js index a5262682fb7..1dd204f2e63 100644 --- a/config/plugins/visualizations/charts/static/views/group.js +++ b/config/plugins/visualizations/charts/static/views/group.js @@ -5,9 +5,6 @@ define(['plugin/library/ui-table', 'plugin/library/ui', 'utils/utils'], // widget return Backbone.View.extend( { - // columns - columns: [], - // initialize initialize: function(app, options) { // link app @@ -121,24 +118,29 @@ return Backbone.View.extend( // get dataset this.app.datasets.request({id : dataset_id}, function(dataset) { - // configure columns - self.columns = []; - var meta = dataset.metadata_column_types; - for (var key in meta) { - // check type - if(meta[key] == 'int' || meta[key] == 'float') { - // add to selection - self.columns.push({ - 'label' : 'Column: ' + (parseInt(key) + 1) + ' [' + meta[key] + ']', - 'value' : key - }); - } - } - // update select fields - for (var key in list) { - list[key].update(self.columns); - list[key].show(); + for (var id in list) { + + // is a numeric number required + var any_type = chart_settings.columns[id].any_type; + + // configure columns + var columns = []; + var meta = dataset.metadata_column_types; + for (var key in meta) { + // check type + if (meta[key] == 'int' || meta[key] == 'float' || any_type) { + // add to selection + columns.push({ + 'label' : 'Column: ' + (parseInt(key) + 1) + ' [' + meta[key] + ']', + 'value' : key + }); + } + } + + // list + list[id].update(columns); + list[id].show(); } // loading diff --git a/doc/source/lib/galaxy.webapps.galaxy.api.rst~ b/doc/source/lib/galaxy.webapps.galaxy.api.rst~ deleted file mode 100644 index 3f6f5a1c5d5..00000000000 --- a/doc/source/lib/galaxy.webapps.galaxy.api.rst~ +++ /dev/null @@ -1,179 +0,0 @@ -api Package -=========== - -:mod:`datasets` Module ----------------------- - -.. automodule:: galaxy.webapps.galaxy.api.datasets - :members: - :undoc-members: - :show-inheritance: - -:mod:`folder_contents` Module ------------------------------ - -.. automodule:: galaxy.webapps.galaxy.api.folder_contents - :members: - :undoc-members: - :show-inheritance: - -:mod:`folders` Module ---------------------- - -.. automodule:: galaxy.webapps.galaxy.api.folders - :members: - :undoc-members: - :show-inheritance: - -:mod:`forms` Module -------------------- - -.. automodule:: galaxy.webapps.galaxy.api.forms - :members: - :undoc-members: - :show-inheritance: - -:mod:`genomes` Module ---------------------- - -.. automodule:: galaxy.webapps.galaxy.api.genomes - :members: - :undoc-members: - :show-inheritance: - -:mod:`group_roles` Module -------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.group_roles - :members: - :undoc-members: - :show-inheritance: - -:mod:`group_users` Module -------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.group_users - :members: - :undoc-members: - :show-inheritance: - -:mod:`groups` Module --------------------- - -.. automodule:: galaxy.webapps.galaxy.api.groups - :members: - :undoc-members: - :show-inheritance: - -:mod:`histories` Module ------------------------ - -.. automodule:: galaxy.webapps.galaxy.api.histories - :members: - :undoc-members: - :show-inheritance: - -:mod:`history_contents` Module ------------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.history_contents - :members: - :undoc-members: - :show-inheritance: - -:mod:`libraries` Module ------------------------ - -.. automodule:: galaxy.webapps.galaxy.api.libraries - :members: - :undoc-members: - :show-inheritance: - -:mod:`library_contents` Module ------------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.library_contents - :members: - :undoc-members: - :show-inheritance: - -:mod:`permissions` Module -------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.permissions - :members: - :undoc-members: - :show-inheritance: - -:mod:`quotas` Module --------------------- - -.. automodule:: galaxy.webapps.galaxy.api.quotas - :members: - :undoc-members: - :show-inheritance: - -:mod:`request_types` Module ---------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.request_types - :members: - :undoc-members: - :show-inheritance: - -:mod:`requests` Module ----------------------- - -.. automodule:: galaxy.webapps.galaxy.api.requests - :members: - :undoc-members: - :show-inheritance: - -:mod:`roles` Module -------------------- - -.. automodule:: galaxy.webapps.galaxy.api.roles - :members: - :undoc-members: - :show-inheritance: - -:mod:`samples` Module ---------------------- - -.. automodule:: galaxy.webapps.galaxy.api.samples - :members: - :undoc-members: - :show-inheritance: - -:mod:`tools` Module -------------------- - -.. automodule:: galaxy.webapps.galaxy.api.tools - :members: - :undoc-members: - :show-inheritance: - -:mod:`users` Module -------------------- - -.. automodule:: galaxy.webapps.galaxy.api.users - :members: - :undoc-members: - :show-inheritance: - -:mod:`visualizations` Module ----------------------------- - -.. automodule:: galaxy.webapps.galaxy.api.visualizations - :members: - :undoc-members: - :show-inheritance: - -:mod:`workflows` Module ------------------------ - -.. automodule:: galaxy.webapps.galaxy.api.workflows - :members: - :undoc-members: - :show-inheritance: - diff --git a/eggs.ini b/eggs.ini index 99b3a40c235..6ad69a4daa2 100644 --- a/eggs.ini +++ b/eggs.ini @@ -3,7 +3,7 @@ ; ; This file is version controlled and should not be edited by hand! ; For more information, see: -; http://wiki.g2.bx.psu.edu/Admin/Config/Eggs +; https://wiki.galaxyproject.org/Admin/Config/Eggs ; [general] diff --git a/job_conf.xml.sample_advanced b/job_conf.xml.sample_advanced index 9e0b589b627..da3b34c1dfb 100644 --- a/job_conf.xml.sample_advanced +++ b/job_conf.xml.sample_advanced @@ -110,7 +110,7 @@ + + + + + + + diff --git a/test/qunit/tests/hda-base.js b/test/qunit/tests/hda-base.js new file mode 100644 index 00000000000..dc0931d8c8d --- /dev/null +++ b/test/qunit/tests/hda-base.js @@ -0,0 +1,35 @@ +// This file isn't really testing anything useful yet, it is just testing +// (or demonstrating) qunit+backbone interactions. +define([ + "mvc/dataset/hda-model", + "mvc/dataset/hda-base", + "jquery", + "sinon-qunit", + "utils/localization" +], function( + hdaModel, + hdaBase, + $, + sinon +){ + /*globals equal test module expect deepEqual strictEqual */ + "use strict"; + + module( "HDA base backbone view tests" ); + + test( "Base HDA view default construction, initialize", function() { + var hda = new hdaModel.HistoryDatasetAssociation({ + id : '123' + }), + view = new hdaBase.HDABaseView({ model: hda }); + + strictEqual( view.model, hda ); + + equal( view.linkTarget, '_blank' ); + equal( view.selectable, false ); + equal( view.selected, false ); + equal( view.expanded, false ); + equal( view.draggable, false ); + equal( view.id(), 'hda-123' ); + }); +}); diff --git a/test/qunit/tests/metrics-logger.html b/test/qunit/tests/metrics-logger.html new file mode 100644 index 00000000000..00e97f6ea8c --- /dev/null +++ b/test/qunit/tests/metrics-logger.html @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/test/qunit/tests/metrics-logger.js b/test/qunit/tests/metrics-logger.js new file mode 100644 index 00000000000..7a2a8480c63 --- /dev/null +++ b/test/qunit/tests/metrics-logger.js @@ -0,0 +1,56 @@ +// This file isn't really testing anything useful yet, it is just testing +// (or demonstrating) qunit+backbone interactions. +define([ + "utils/metrics-logger", + "jquery", + "sinon-qunit" +], function( + metrics, + $, + sinon +){ + /*globals equal test module expect deepEqual strictEqual throws */ + "use strict"; + + module( "Metrics logger tests" ); + + test( "logger construction/initializiation defaults", function() { + var logger = new metrics.MetricsLogger({}); + equal( logger.consoleLogger, null ); + equal( logger.options.logLevel, metrics.MetricsLogger.INFO ); + equal( logger.options.consoleLevel, metrics.MetricsLogger.NONE ); + equal( logger.options.defaultNamespace, 'Galaxy' ); + equal( logger.options.clientPrefix, 'client.' ); + equal( logger.options.postSize, 1000 ); + equal( logger.options.maxCacheSize, 3000 ); + equal( logger.options.addTime, true ); + + equal( logger._postSize, 1000 ); + equal( logger.cache.constructor, metrics.LoggingCache ); + }); + + test( "_parseLevel", function() { + var logger = new metrics.MetricsLogger({}); + equal( logger._parseLevel( 'all' ), metrics.MetricsLogger.ALL ); + equal( logger._parseLevel( 'debug' ), metrics.MetricsLogger.DEBUG ); + equal( logger._parseLevel( 'info' ), metrics.MetricsLogger.INFO ); + equal( logger._parseLevel( 'warn' ), metrics.MetricsLogger.WARN ); + equal( logger._parseLevel( 'error' ), metrics.MetricsLogger.ERROR ); + equal( logger._parseLevel( 'metric' ), metrics.MetricsLogger.METRIC ); + equal( logger._parseLevel( 'none' ), metrics.MetricsLogger.NONE ); + equal( logger._parseLevel( 15 ), 15 ); + + throws( function(){ + logger._parseLevel( undefined ); + }, /Unknown log level/, 'Unknown log level throws error' ); + throws( function(){ + logger._parseLevel( 'nope' ); + }, /Unknown log level/, 'Unknown log level throws error' ); + }); + + test( "cache construction/initializiation defaults", function() { + var cache = new metrics.LoggingCache(); + equal( cache.maxSize, 5000 ); + equal( $.type( cache._cache ), 'array' ); + }); +}); diff --git a/test/qunit/tests/workflow_editor_tests.html b/test/qunit/tests/workflow_editor_tests.html new file mode 100644 index 00000000000..00e97f6ea8c --- /dev/null +++ b/test/qunit/tests/workflow_editor_tests.html @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/test/qunit/tests/workflow_editor_tests.js b/test/qunit/tests/workflow_editor_tests.js new file mode 100644 index 00000000000..e065c1125de --- /dev/null +++ b/test/qunit/tests/workflow_editor_tests.js @@ -0,0 +1,379 @@ +/* global define, QUnit, module, test, ok, equal, deepEqual, notEqual */ +/* global Workflow, CanvasManager, InputTerminal, Connector, add_node */ +define([ + "galaxy.workflow_editor.canvas", + "jquery", + "sinon-qunit" +], function( + workflowEditor, + $, + sinon +){ + "use strict"; + + // globals cosumed by workflow editor + window.show_form_for_tool = sinon.spy(); + window.workflow = null; + window.canvas_manager = null; + + // Stub used over stubbing issubtype for unit testing datatype comparisons. + var issubtypeStub = null; + + QUnit.moduleStart(function() { + if( issubtypeStub === null) { + issubtypeStub = sinon.stub( window, "issubtype" ); + } + }); + QUnit.moduleDone(function() { + if( issubtypeStub !== null) { + issubtypeStub.restore(); + issubtypeStub = null; + } + }); + + var with_canvas_container = function( f ) { + var canvas_container = $("
"); + $("body").append( canvas_container ); + f( canvas_container ); + canvas_container.remove(); + }; + + var with_workflow_global = function( f ) { + var overview = $( "
" ); + var canvas_viewport = $( "
" ); + + $("body").append( overview, canvas_viewport ); + window.canvas_manager = new CanvasManager( canvas_viewport, overview ); + with_canvas_container( function( canvas_container ) { + window.workflow = new Workflow( canvas_container ); + f( window.workflow ); + window.workflow = null; + } ); + window.canvas_manager = null; + overview.remove(); + canvas_viewport.remove(); + }; + + module( "Input terminal model test", { + setup: function() { + this.node = { }; + this.element = $( "
" ); + this.input_terminal = new InputTerminal( this.element, [ "txt" ] ); + this.input_terminal.node = this.node; + }, + test_connector: function( attr ) { + var connector = attr || {}; + this.input_terminal.connectors.push( connector ); + return connector; + }, + with_test_connector: function( attr, f ) { + this.test_connector( attr ); + f(); + this.reset_connectors(); + }, + reset_connectors: function( ) { + this.input_terminal.connectors = []; + }, + test_accept: function( other ) { + other = other || { node: {}, datatypes: [ "txt" ] }; + return this.input_terminal.can_accept( other ); + } + } ); + + test( "test connect", function() { + this.node.changed = sinon.spy(); + + var connector = {}; + this.input_terminal.connect( connector ); + + // Assert node changed called + ok( this.node.changed.called ); + // Assert connectors updated + ok( this.input_terminal.connectors[ 0 ] === connector ); + } ); + + test( "test disconnect", function() { + this.node.changed = sinon.spy(); + + var connector = this.test_connector( {} ); + this.input_terminal.disconnect( connector ); + + // Assert node changed called + ok( this.node.changed.called ); + // Assert connectors updated + equal( this.input_terminal.connectors.length, 0 ); + } ); + + test( "test redraw", function() { + var connector = this.test_connector( { redraw: sinon.spy() } ); + this.input_terminal.redraw(); + // Assert connectors were redrawn + ok( connector.redraw.called ); + } ); + + test( "test destroy", function() { + var connector = this.test_connector( { destroy: sinon.spy() } ); + + this.input_terminal.destroy(); + // Assert connectors were redrawn + ok( connector.destroy.called ); + } ); + + test( "can accept correct datatype", function() { + issubtypeStub.returns(true); + ok( this.test_accept() ) ; + } ); + + test( "cannot accept incorrect datatypes", function() { + issubtypeStub.returns(false); + ok( ! this.test_accept() ); + } ); + + test( "can accept inputs", function() { + issubtypeStub.returns(false); + // Other is data input module - always accept (currently - could be + // more intelligent by looking at what else input is connected to. + var other = { node: {}, datatypes: [ "input" ] }; + ok( this.test_accept( other ) ); + } ); + + test( "cannot accept when already connected", function() { + issubtypeStub.returns(true); + var self = this; + // If other is subtype but already connected, cannot accept + this.with_test_connector( {}, function() { + ok( ! self.test_accept() ); + } ); + } ); + + module( "Connector test", { + + } ); + + test( "connects only if both valid handles", function() { + var input = { connect: sinon.spy() }; + var output = { connect: sinon.spy() }; + new Connector( input, null ); + new Connector( null, output ); + // Not attempts to connect... + ok( ! input.connect.called ); + ok( ! output.connect.called ); + + new Connector( input, output ); + ok( input.connect.called ); + ok( output.connect.called ); + }); + + test( "default attributes", function() { + var input = { connect: sinon.spy() }; + var output = { connect: sinon.spy() }; + var connector = new Connector( input, output ); + + equal( connector.dragging, false ); + equal( connector.canvas, null ); + equal( connector.inner_color, "#FFFFFF" ); + equal( connector.outer_color, "#D8B365" ); + } ); + + test( "destroy", function() { + var input = { connect: sinon.spy(), disconnect: sinon.spy() }; + var output = { connect: sinon.spy(), disconnect: sinon.spy() }; + var connector = new Connector( input, output ); + + connector.destroy(); + ok( input.disconnect.called ); + ok( output.disconnect.called ); + } ); + + test( "initial redraw", function() { + with_canvas_container( function( canvas_container ) { + var input = { connect: sinon.spy(), element: $("
") }; + var output = { connect: sinon.spy(), element: $("
") }; + var connector = new Connector( input, output ); + + connector.redraw(); + // Ensure canvas gets set + ok( connector.canvas ); + // Ensure it gest added to canvas container + equal( canvas_container.children()[ 0 ], connector.canvas ); + } ); + } ); + + module( "Node unit test", { + setup: function() { + this.input_terminal = { destroy: sinon.spy(), redraw: sinon.spy() }; + this.output_terminal = { destroy: sinon.spy(), redraw: sinon.spy() }; + this.element = $("
"); + this.node = new Node( this.element ); + this.node.input_terminals.i1 = this.input_terminal; + this.node.output_terminals.o1 = this.output_terminal; + }, + $: function( selector ) { + return $( this.node.element.find( selector ) ); + }, + expect_workflow_node_changed: function( f ) { + var node = this.node; + with_workflow_global( function( workflow ) { + var node_changed_spy = sinon.spy( workflow, "node_changed" ); + f(); + ok( node_changed_spy.calledWith( node ) ); + } ); + }, + init_field_data_simple: function() { + var data = { + data_inputs: [ {name: "input1", extensions: [ "data" ] } ], + data_outputs: [ {name: "output1", extensions: [ "data" ] } ], + }; + this.node.init_field_data( data ); + }, + update_field_data_with_new_input: function() { + var new_data = { + data_inputs: [ + { name: "input1", extensions: [ "data" ] }, + { name: "extra_0|input1", extensions: [ "data" ] }, + ], + data_outputs: [ {name: "output1", extensions: [ "data" ] } ], + post_job_actions: "{}" + }; + this.node.update_field_data( new_data ); + } + } ); + + test( "make active", function() { + ok( ! this.element.hasClass( "toolForm-active" ) ); + this.node.make_active(); + ok( this.element.hasClass( "toolForm-active" ) ); + } ); + + test( "destroy", function() { + var test = this; + with_workflow_global( function( workflow ) { + var remove_node_spy = sinon.spy( workflow, "remove_node" ); + test.node.destroy(); + ok( test.input_terminal.destroy.called ); + ok( test.output_terminal.destroy.called ); + ok( remove_node_spy.calledWith( test.node ) ); + } ); + } ); + + test( "error", function() { + // Test body of toolFormBody div updated and workflow notified of change. + var test = this; + this.expect_workflow_node_changed( function() { + test.node.error( "TOOL ERROR" ); + equal( $( test.$(".toolFormBody").children()[ 0 ] ).html(), "TOOL ERROR" ); + } ); + } ); + + test( "init_field_data properties", function() { + var node = this.node; + this.expect_workflow_node_changed( function( ) { + var data = { + data_inputs: [], + data_outputs: [], + type: "tool", + name: "cat1", + form_html: "
", + tool_state: "ok", + tool_errors: false, + tooltip: "tool tooltip", + annotation: "tool annotation", + workflow_outputs: [ "out1" ], + }; + node.init_field_data( data ); + equal( node.type, "tool" ); + equal( node.name, "cat1" ); + equal( node.form_html, "" ); + equal( node.tool_state, "ok" ); + equal( node.tooltip, "tool tooltip" ); + equal( node.annotation, "tool annotation" ); + deepEqual( node.post_job_actions, {} ); + deepEqual( node.workflow_outputs, [ "out1" ] ); + } ); + } ); + + test( "init_field_data data", function() { + var test = this; + this.expect_workflow_node_changed( function( ) { + // pre-init not tool form body... + equal( test.$( ".output-terminal" ).length, 0 ); + equal( test.$( ".input-terminal" ).length, 0 ); + equal( test.$( ".rule" ).length, 0 ); + + test.init_field_data_simple(); + + // After init tool form should have three "rows"/divs - , inputs div, one output, and rule... + equal( test.$( ".output-terminal" ).length, 1 ); + equal( test.$( ".input-terminal" ).length, 1 ); + equal( test.$( ".rule" ).length, 1 ); + + equal( test.$( ".toolFormBody" ).children().length, 3 ); + } ); + } ); + + test( "update_field_data updated data inputs and outputs", function() { + var test = this; + this.expect_workflow_node_changed( function( ) { + // Call init with one input and output. + test.init_field_data_simple(); + + test.update_field_data_with_new_input(); + + // Now there are 2 inputs... + equal( test.$( ".input-terminal" ).length, 2 ); + equal( test.$( ".output-terminal" ).length, 1 ); + equal( test.$( ".rule" ).length, 1 ); + } ); + } ); + + test( "update_field_data preserves connectors", function() { + var test = this; + var node = this.node; + this.expect_workflow_node_changed( function( ) { + // Call init with one input and output. + test.init_field_data_simple(); + + var connector = new Connector(); + var old_input_terminal = node.input_terminals.input1; + old_input_terminal.connectors.push( connector ); + + test.update_field_data_with_new_input(); + + var new_input_terminal = node.input_terminals.input1; + equal( old_input_terminal, old_input_terminal ); + notEqual( old_input_terminal, new_input_terminal ); + equal( connector, new_input_terminal.connectors[ 0 ] ); + } ); + } ); + + test( "update_field_data destroys old terminals", function() { + var test = this; + var node = this.node; + this.expect_workflow_node_changed( function( ) { + var data = { + data_inputs: [ { name: "input1", extensions: [ "data" ] }, + { name: "willDisappear", extensions: [ "data" ] } ], + data_outputs: [ {name: "output1", extensions: [ "data" ] } ], + }; + node.init_field_data( data ); + + var old_input_terminal = node.input_terminals.willDisappear; + var destroy_spy = sinon.spy( old_input_terminal, "destroy" ); + // Update + test.update_field_data_with_new_input(); + + ok( destroy_spy.called ); + } ); + } ); + + module( "add_node" ); + + test( "node added to workflow", function() { + with_workflow_global( function( workflow ) { + var add_node_spy = sinon.spy( workflow, "add_node" ); + var node = add_node( "tool", "Cat Files", "cat1" ); + ok( add_node_spy.calledWith( node ) ); + } ); + } ); + +}); \ No newline at end of file diff --git a/test/tool_shed/base/twilltestcase.py b/test/tool_shed/base/twilltestcase.py index c647a20e50f..040f8166692 100644 --- a/test/tool_shed/base/twilltestcase.py +++ b/test/tool_shed/base/twilltestcase.py @@ -1418,10 +1418,10 @@ class ShedTwillTestCase( TwillTestCase ): def verify_repository_reviews( self, repository, reviewer=None, strings_displayed=[], strings_not_displayed=[] ): changeset_revision = self.get_repository_tip( repository ) # Verify that the currently logged in user has a repository review for the specified repository, reviewer, and changeset revision. - strings_displayed=[ repository.name, reviewer.username, changeset_revision ] + strings_displayed=[ repository.name, reviewer.username ] self.display_reviewed_repositories_owned_by_user( strings_displayed=strings_displayed ) # Verify that the reviewer has reviewed the specified repository's changeset revision. - strings_displayed=[ repository.name, repository.description, changeset_revision ] + strings_displayed=[ repository.name, repository.description ] self.display_repository_reviews_by_user( reviewer, strings_displayed=strings_displayed ) # Load the review and check for the components passed in strings_displayed. review = test_db_util.get_repository_review_by_user_id_changeset_revision( reviewer.id, repository.id, changeset_revision ) diff --git a/test/tool_shed/functional/test_0420_citable_urls_for_repositories.py b/test/tool_shed/functional/test_0420_citable_urls_for_repositories.py index ba5e911ee87..a76c4bf33be 100644 --- a/test/tool_shed/functional/test_0420_citable_urls_for_repositories.py +++ b/test/tool_shed/functional/test_0420_citable_urls_for_repositories.py @@ -104,7 +104,6 @@ class TestRepositoryCitableURLs( ShedTwillTestCase ): strings_displayed = [ '/repository/browse_repositories', encoded_user_id, 'operation=repositories_by_user' ] strings_displayed.append( encoded_user_id ) strings_displayed_in_iframe = [ 'user1', 'filtering_0420', 'Galaxy filtering tool for test 0420' ] - strings_displayed_in_iframe.append( self.get_repository_tip( repository ) ) self.load_citable_url( username='user1', repository_name=None, changeset_revision=None, @@ -208,7 +207,6 @@ class TestRepositoryCitableURLs( ShedTwillTestCase ): strings_displayed.extend( [ 'list+of+repositories+owned', 'does+not+include+one+named', '%21%21invalid%21%21', 'status=error' ] ) strings_displayed_in_iframe = [ 'user1', 'filtering_0420' ] strings_displayed_in_iframe.append( 'Repositories Owned by user1' ) - strings_displayed_in_iframe.append( tip_revision ) self.load_citable_url( username='user1', repository_name='!!invalid!!', changeset_revision=None, diff --git a/tool_shed_wsgi.ini.sample b/tool_shed_wsgi.ini.sample index d91bcb1e149..2a22906b139 100644 --- a/tool_shed_wsgi.ini.sample +++ b/tool_shed_wsgi.ini.sample @@ -55,7 +55,7 @@ id_secret = changethisinproductiontoo # User authentication can be delegated to an upstream proxy server (usually # Apache). The upstream proxy should set a REMOTE_USER header in the request. # Enabling remote user disables regular logins. For more information, see: -# http://wiki.g2.bx.psu.edu/Admin/Config/Apache%20Proxy +# https://wiki.galaxyproject.org/Admin/Config/ApacheProxy #use_remote_user = False # Configuration for debugging middleware @@ -82,7 +82,7 @@ sendmail_path = /usr/sbin/sendmail #email_from = your_tool_shed_email@server # The URL linked by the "Support" link in the "Help" menu. -#support_url = http://wiki.g2.bx.psu.edu/Support +#support_url = https://wiki.galaxyproject.org/Support # Write thread status periodically to 'heartbeat.log' (careful, uses disk space rapidly!) ## use_heartbeat = True diff --git a/tools/data_source/microbial_import.xml b/tools/data_source/microbial_import.xml index e6fd8be575f..06eae2d6e82 100644 --- a/tools/data_source/microbial_import.xml +++ b/tools/data_source/microbial_import.xml @@ -109,7 +109,6 @@ Organisms in **bold** are available at the UCSC Browser. **Note:** Having trouble locating your organism? Click here_ for a list of available species and their location. -.. _here: http://wiki.g2.bx.psu.edu/Main/Data%20Libraries/Microbes - +.. _here: https://wiki.galaxyproject.org/Main/Data%20Libraries/Microbes diff --git a/tools/next_gen_conversion/fastq_gen_conv.xml b/tools/next_gen_conversion/fastq_gen_conv.xml index 6eee981a591..80856085868 100644 --- a/tools/next_gen_conversion/fastq_gen_conv.xml +++ b/tools/next_gen_conversion/fastq_gen_conv.xml @@ -75,7 +75,7 @@ Galaxy pipeline for mapping of Illumina data requires data to be in fastq format A good description of fastq datasets can be found `here`__, while a description of Galaxy's fastq "logic" can be found `here`__. Because ranges of quality values within different types of fastq datasets overlap it very difficult to detect them automatically. This tool supports conversion of two commonly found types (Solexa/Illumina 1.0 and Illumina 1.3+) into fastq Sanger. .. __: http://en.wikipedia.org/wiki/FASTQ_format - .. __: http://wiki.g2.bx.psu.edu/Admin/NGS%20Local%20Setup + .. __: https://wiki.galaxyproject.org/Learn/Datatypes#Fastq .. class:: warningmark