mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Merge branch 'release_21.09' into dev
This commit is contained in:
@@ -298,6 +298,7 @@ export default {
|
||||
this.$emit("onChange");
|
||||
},
|
||||
setData(data) {
|
||||
this.content_id = data.content_id;
|
||||
this.tool_state = data.tool_state;
|
||||
this.errors = data.errors;
|
||||
this.tooltip = data.tooltip || "";
|
||||
@@ -311,7 +312,6 @@ export default {
|
||||
},
|
||||
initData(data) {
|
||||
this.uuid = data.uuid;
|
||||
this.content_id = data.config_form?.id || data.content_id;
|
||||
this.annotation = data.annotation;
|
||||
this.label = data.label;
|
||||
this.setData(data);
|
||||
|
||||
@@ -612,6 +612,7 @@ class WorkflowsAPIController(BaseGalaxyAPIController, UsesStoredWorkflowMixin, U
|
||||
'annotation': inputs.get('__annotation', ''),
|
||||
'name': module.get_name(),
|
||||
'tool_state': module.get_state(),
|
||||
'content_id': module.get_content_id(),
|
||||
'inputs': module.get_all_inputs(connectable_only=True),
|
||||
'outputs': module.get_all_outputs(),
|
||||
'config_form': module.get_config_form(),
|
||||
|
||||
@@ -251,6 +251,32 @@ class HistoryContentsApiTestCase(ApiTestCase):
|
||||
assert objects[0]["deleted"] is False
|
||||
assert objects[0]["visible"] is True
|
||||
|
||||
def test_update_batch_collections(self):
|
||||
hdca = self._create_pair_collection()
|
||||
assert hdca["deleted"] is False
|
||||
assert hdca["visible"] is True
|
||||
|
||||
# update deleted flag => true
|
||||
payload = dict(items=[{"history_content_type": "dataset_collection", "id": hdca["id"]}], deleted=True)
|
||||
update_response = self._update_batch(payload)
|
||||
objects = update_response.json()
|
||||
assert objects[0]["deleted"] is True
|
||||
assert objects[0]["visible"] is True
|
||||
|
||||
# update visibility flag => false
|
||||
payload = dict(items=[{"history_content_type": "dataset_collection", "id": hdca["id"]}], visible=False)
|
||||
update_response = self._update_batch(payload)
|
||||
objects = update_response.json()
|
||||
assert objects[0]["deleted"] is True
|
||||
assert objects[0]["visible"] is False
|
||||
|
||||
# update both flags
|
||||
payload = dict(items=[{"history_content_type": "dataset_collection", "id": hdca["id"]}], deleted=False, visible=True)
|
||||
update_response = self._update_batch(payload)
|
||||
objects = update_response.json()
|
||||
assert objects[0]["deleted"] is False
|
||||
assert objects[0]["visible"] is True
|
||||
|
||||
def test_update_type_failures(self):
|
||||
hda1 = self._wait_for_new_hda()
|
||||
update_response = self._update(hda1["id"], dict(deleted='not valid'))
|
||||
|
||||
@@ -386,6 +386,14 @@ class TestWithSeleniumMixin(GalaxyTestSeleniumContext, UsesApiTestCaseMixin):
|
||||
self.assert_no_error_message()
|
||||
return GALAXY_TEST_SELENIUM_ADMIN_USER_EMAIL
|
||||
|
||||
@retry_assertion_during_transitions
|
||||
def assert_workflow_has_changes_and_save(self):
|
||||
save_button = self.components.workflow_editor.save_button
|
||||
save_button.wait_for_visible()
|
||||
assert not save_button.has_class("disabled")
|
||||
save_button.wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
|
||||
def workflow_upload_yaml_with_random_name(self, content, **kwds):
|
||||
workflow_populator = self.workflow_populator
|
||||
name = self._get_random_name()
|
||||
|
||||
@@ -71,7 +71,7 @@ class WorkflowEditorTestCase(SeleniumTestCase):
|
||||
|
||||
new_annotation = 'look new annotation'
|
||||
edit_annotation.wait_for_and_send_keys(new_annotation)
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
self.workflow_index_open_with_name(name)
|
||||
self.assert_wf_annotation_is(new_annotation)
|
||||
|
||||
@@ -84,7 +84,7 @@ class WorkflowEditorTestCase(SeleniumTestCase):
|
||||
edit_name = self.components.workflow_editor.edit_name
|
||||
edit_name.wait_for_and_send_keys(new_name)
|
||||
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
self.workflow_index_open_with_name(new_name)
|
||||
self.assert_wf_name_is(name)
|
||||
|
||||
@@ -104,19 +104,19 @@ class WorkflowEditorTestCase(SeleniumTestCase):
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.components.tool_form.parameter_input(parameter='select_single').wait_for_and_send_keys('e')
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
workflow = self.workflow_populator.download_workflow(workflow_id)
|
||||
tool_state = json.loads(workflow['steps']['0']['tool_state'])
|
||||
assert tool_state['select_single'] == 'parameter value'
|
||||
# Disable optional button, resets value to null
|
||||
self.components.tool_form.parameter_checkbox(parameter='select_single').wait_for_and_click()
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
workflow = self.workflow_populator.download_workflow(workflow_id)
|
||||
tool_state = json.loads(workflow['steps']['0']['tool_state'])
|
||||
assert tool_state['select_single'] is None
|
||||
# Enable button but don't provide a value
|
||||
self.components.tool_form.parameter_checkbox(parameter='select_single').wait_for_and_click()
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
workflow = self.workflow_populator.download_workflow(workflow_id)
|
||||
tool_state = json.loads(workflow['steps']['0']['tool_state'])
|
||||
assert tool_state['select_single'] == ""
|
||||
@@ -193,7 +193,7 @@ steps:
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.set_text_element(columns, '4\n5\n6\n')
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
self.driver.refresh()
|
||||
node.title.wait_for_and_click()
|
||||
textarea_columns = columns.wait_for_visible()
|
||||
@@ -272,6 +272,32 @@ steps:
|
||||
self.workflow_editor_connect("input_int#output", "tool_exec#inttest", screenshot_partial="workflow_editor_parameter_connection_dragging")
|
||||
self.assert_connected("input_int#output", "tool_exec#inttest")
|
||||
|
||||
@selenium_test
|
||||
def test_non_data_map_over_carried_through(self):
|
||||
# Use auto_layout=false, which prevents placing any
|
||||
# step outside of the scroll area
|
||||
# xref: https://github.com/galaxyproject/galaxy/issues/13211
|
||||
self.open_in_workflow_editor("""
|
||||
class: GalaxyWorkflow
|
||||
inputs:
|
||||
input_collection:
|
||||
type: collection
|
||||
collection_type: "list"
|
||||
steps:
|
||||
param_value_from_file:
|
||||
tool_id: param_value_from_file
|
||||
in:
|
||||
input1: input_collection
|
||||
text_input_step:
|
||||
tool_id: param_text_option
|
||||
in:
|
||||
text_param: param_value_from_file/text_param
|
||||
collection_input:
|
||||
tool_id: identifier_collection
|
||||
""", auto_layout=False)
|
||||
self.workflow_editor_connect("text_input_step#out_file1", "collection_input#input1")
|
||||
self.assert_connected("text_input_step#out_file1", "collection_input#input1")
|
||||
|
||||
@selenium_test
|
||||
def test_existing_connections(self):
|
||||
self.open_in_workflow_editor(WORKFLOW_SIMPLE_CAT_TWICE)
|
||||
@@ -301,7 +327,7 @@ steps:
|
||||
self.workflow_editor_connect("input1#output", "first_cat#input1")
|
||||
self.assert_connected("input1#output", "first_cat#input1")
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
self.workflow_index_open_with_name(name)
|
||||
self.assert_connected("input1#output", "first_cat#input1")
|
||||
|
||||
@@ -423,7 +449,7 @@ steps:
|
||||
assert self.select_dropdown_item('Switch to 0.2'), 'Switch to tool version dropdown item not found'
|
||||
self.screenshot("workflow_editor_version_update")
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
workflow = self.workflow_populator.download_workflow(workflow_id)
|
||||
assert workflow['steps']['0']['tool_version'] == '0.2'
|
||||
|
||||
@@ -436,7 +462,7 @@ steps:
|
||||
self.assert_modal_has_text("Using version '0.2' instead of version '0.0.1'")
|
||||
self.screenshot("workflow_editor_tool_upgrade")
|
||||
self.components.workflow_editor.modal_button_continue.wait_for_and_click()
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
|
||||
@selenium_test
|
||||
def test_editor_subworkflow_tool_upgrade_message(self):
|
||||
@@ -463,7 +489,7 @@ steps:
|
||||
self.assert_modal_has_text("parameter 'inttest': an integer or workflow parameter is required")
|
||||
self.screenshot("workflow_editor_subworkflow_tool_upgrade")
|
||||
self.components.workflow_editor.modal_button_continue.wait_for_and_click()
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
|
||||
@staticmethod
|
||||
def set_text_element(element, value):
|
||||
@@ -484,9 +510,9 @@ steps:
|
||||
self.set_text_element(editor.label_input, 'source label')
|
||||
# Select node using new label, ensures labels are synced between side panel and node
|
||||
cat_node = editor.node._(label="source label")
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
editor.annotation_input.wait_for_and_send_keys("source annotation")
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
editor.configure_output(output='out_file1').wait_for_and_click()
|
||||
output_label = editor.label_output(output='out_file1')
|
||||
self.set_text_element(output_label, 'workflow output label')
|
||||
@@ -501,7 +527,7 @@ steps:
|
||||
output_label = editor.label_output(output='out_file1')
|
||||
self.set_text_element(output_label, 'cloned output label')
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
edited_workflow = self.workflow_populator.download_workflow(workflow_id)
|
||||
source_step = next(iter(step for step in edited_workflow['steps'].values() if step['label'] == 'source label'))
|
||||
cloned_step = next(iter(step for step in edited_workflow['steps'].values() if step['label'] == 'cloned label'))
|
||||
@@ -533,7 +559,7 @@ steps:
|
||||
editor.tool_menu_section_link(section_name="workflows").wait_for_and_click()
|
||||
editor.workflow_link(workflow_title=child_workflow_name).wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.assert_has_changes_and_save()
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
workflow = self.workflow_populator.download_workflow(parent_workflow_id)
|
||||
subworkflow_step = workflow['steps']['1']
|
||||
assert subworkflow_step['name'] == child_workflow_name
|
||||
@@ -630,11 +656,12 @@ steps:
|
||||
source_id, sink_id = self.workflow_editor_source_sink_terminal_ids(source, sink)
|
||||
self.components.workflow_editor.connector_for(source_id=source_id, sink_id=sink_id).wait_for_absent()
|
||||
|
||||
def open_in_workflow_editor(self, yaml_content):
|
||||
def open_in_workflow_editor(self, yaml_content, auto_layout=True):
|
||||
name = self.workflow_upload_yaml_with_random_name(yaml_content)
|
||||
self.workflow_index_open()
|
||||
self.workflow_index_open_with_name(name)
|
||||
self.workflow_editor_click_option("Auto Layout")
|
||||
if auto_layout:
|
||||
self.workflow_editor_click_option("Auto Layout")
|
||||
return name
|
||||
|
||||
def workflow_editor_source_sink_terminal_ids(self, source, sink):
|
||||
@@ -704,14 +731,6 @@ steps:
|
||||
workflow_populator.upload_yaml_workflow(content, name=name)
|
||||
return name
|
||||
|
||||
@retry_assertion_during_transitions
|
||||
def assert_has_changes_and_save(self):
|
||||
save_button = self.components.workflow_editor.save_button
|
||||
save_button.wait_for_visible()
|
||||
assert not save_button.has_class("disabled")
|
||||
save_button.wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
|
||||
@retry_assertion_during_transitions
|
||||
def assert_wf_name_is(self, expected_name):
|
||||
edit_name_element = self.components.workflow_editor.edit_name.wait_for_visible()
|
||||
|
||||
@@ -1 +1 @@
|
||||
include *.rst *.txt LICENSE
|
||||
include *.rst *.txt LICENSE galaxy_test/base/tool_sheds_conf.xml
|
||||
|
||||
@@ -38,7 +38,9 @@ ENTRY_POINTS = '''
|
||||
'''
|
||||
PACKAGE_DATA = {
|
||||
# Be sure to update MANIFEST.in for source dist.
|
||||
'galaxy': [
|
||||
'galaxy': [],
|
||||
'galaxy_test': [
|
||||
'galaxy_test/base/tool_sheds_conf.xml',
|
||||
],
|
||||
}
|
||||
PACKAGE_DIR = {
|
||||
|
||||
@@ -5,8 +5,8 @@ import pytest
|
||||
from nose.plugins.skip import SkipTest
|
||||
|
||||
from galaxy_test.base.populators import DatasetPopulator, skip_if_toolshed_down
|
||||
from galaxy_test.base.uses_shed import CONDA_AUTO_INSTALL_JOB_TIMEOUT, UsesShed
|
||||
from galaxy_test.driver import integration_util
|
||||
from .uses_shed import CONDA_AUTO_INSTALL_JOB_TIMEOUT, UsesShed
|
||||
|
||||
FETCH_TOOL_ID = 'toolshed.g2.bx.psu.edu/repos/devteam/data_manager_fetch_genome_dbkeys_all_fasta/data_manager_fetch_genome_all_fasta_dbkey/0.0.3'
|
||||
FETCH_GENOME_DBKEYS_ALL_FASTA_INPUT = {
|
||||
|
||||
@@ -5,8 +5,8 @@ import string
|
||||
from nose.plugins.skip import SkipTest
|
||||
|
||||
from galaxy_test.base.populators import DatasetPopulator
|
||||
from galaxy_test.base.uses_shed import CONDA_AUTO_INSTALL_JOB_TIMEOUT, UsesShed
|
||||
from galaxy_test.driver import integration_util
|
||||
from .uses_shed import CONDA_AUTO_INSTALL_JOB_TIMEOUT, UsesShed
|
||||
|
||||
FETCH_TOOL_ID = 'toolshed.g2.bx.psu.edu/repos/devteam/data_manager_fetch_genome_dbkeys_all_fasta/data_manager_fetch_genome_all_fasta_dbkey/0.0.3'
|
||||
FETCH_GENOME_DBKEYS_ALL_FASTA_INPUT = {
|
||||
|
||||
@@ -2,9 +2,9 @@ import os
|
||||
from collections import namedtuple
|
||||
|
||||
from galaxy_test.base.populators import DatasetPopulator
|
||||
from galaxy_test.base.uses_shed import UsesShed
|
||||
from galaxy_test.driver import integration_util
|
||||
from tool_shed.util import hg_util
|
||||
from .uses_shed import UsesShed
|
||||
|
||||
REPO_TYPE = namedtuple('REPO_TYPE', 'name owner changeset')
|
||||
REPO = REPO_TYPE(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import os
|
||||
|
||||
from galaxy_test.base.populators import skip_if_toolshed_down
|
||||
from galaxy_test.base.uses_shed import UsesShed
|
||||
from galaxy_test.driver import integration_util
|
||||
from .uses_shed import UsesShed
|
||||
|
||||
|
||||
class ToolShedToolTestIntegrationTestCase(integration_util.IntegrationTestCase, UsesShed):
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
from galaxy_test.base.uses_shed import UsesShed
|
||||
from .framework import (
|
||||
selenium_test,
|
||||
SeleniumIntegrationTestCase
|
||||
)
|
||||
|
||||
|
||||
class WorkflowEditorToolUpgradeWithToolShedToolTestCase(SeleniumIntegrationTestCase, UsesShed):
|
||||
requires_admin = True
|
||||
|
||||
@classmethod
|
||||
def handle_galaxy_config_kwds(cls, config):
|
||||
cls.configure_shed(config)
|
||||
|
||||
@selenium_test
|
||||
def test_tool_shed_tool_update_in_workflow_editor(self):
|
||||
self.install_repository("iuc", "compose_text_param", "feb3acba1e0a") # 0.1.0
|
||||
self.install_repository("iuc", "compose_text_param", "e188c9826e0f") # 0.1.1
|
||||
self.login()
|
||||
workflow_populator = self.workflow_populator
|
||||
workflow_id = workflow_populator.upload_yaml_workflow("""class: GalaxyWorkflow
|
||||
inputs: []
|
||||
steps:
|
||||
- tool_id: compose_text_param
|
||||
tool_version: 0.1.0
|
||||
label: compose_text_param
|
||||
""", exact_tools=True)
|
||||
self.workflow_index_open()
|
||||
self.workflow_index_click_option("Edit")
|
||||
editor = self.components.workflow_editor
|
||||
editor.node._(label="compose_text_param").wait_for_and_click()
|
||||
editor.tool_version_button.wait_for_and_click()
|
||||
assert self.select_dropdown_item('Switch to 0.1.1'), 'Switch to tool version dropdown item not found'
|
||||
self.screenshot("workflow_editor_version_update_tool_shed")
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.assert_workflow_has_changes_and_save()
|
||||
workflow = self.workflow_populator.download_workflow(workflow_id)
|
||||
assert workflow['steps']['0']['tool_version'] == '0.1.1'
|
||||
assert workflow['steps']['0']['tool_id'] == 'toolshed.g2.bx.psu.edu/repos/iuc/compose_text_param/compose_text_param/0.1.1'
|
||||
Reference in New Issue
Block a user