mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix TRS search if search term contains -
Such as `organization: iwc-workflows`.
This commit is contained in:
@@ -390,6 +390,7 @@ trs_search:
|
||||
selector: "//td[contains(text(), '${workflow_name}')]"
|
||||
import_button: ".workflow-import"
|
||||
select_server_button: "#dropdownTrsServer"
|
||||
import_version: '[data-version-name*="${version}"]'
|
||||
select_server:
|
||||
type: xpath
|
||||
selector: "//a[contains(@class, 'dropdown-item') and text() = '${server}']"
|
||||
|
||||
@@ -17,7 +17,7 @@ def parse_filters(search_term, filters):
|
||||
search_term_without_filters = None
|
||||
search_space = search_term.replace('"', "'")
|
||||
filter_keys = "|".join(list(filters.keys()))
|
||||
pattern = fr"({filter_keys}):(\w+|\'.*?\')"
|
||||
pattern = fr"({filter_keys}):([\w-]+|\'.*?\')"
|
||||
reserved = re.compile(pattern)
|
||||
while True:
|
||||
match = reserved.search(search_space)
|
||||
|
||||
@@ -16,6 +16,7 @@ TRS_CONFIG = """
|
||||
link_url: https://workflowhub.eu
|
||||
"""
|
||||
TRS_ID_DOCKSTORE = "workflow/github.com/iwc-workflows/sars-cov-2-pe-illumina-artic-variant-calling/COVID-19-PE-ARTIC-ILLUMINA"
|
||||
TRS_NAME = "sars-cov-2-pe-illumina-artic-variant-calling/COVID-19-PE-ARTIC-ILLUMINA"
|
||||
TRS_VERSION_DOCKSTORE = 'v0.4'
|
||||
TRS_ID_WORKFLOWHUB = "110"
|
||||
TRS_VERSION_WORKFLOWHUB = "4"
|
||||
@@ -65,6 +66,15 @@ class TrsImportTestCase(SeleniumIntegrationTestCase):
|
||||
self.workflow_index_open()
|
||||
self.assert_workflow_imported("Test Workflow")
|
||||
|
||||
def test_import_by_organization_search_dockstore(self):
|
||||
self.trs_search()
|
||||
self.components.trs_search.search.wait_for_and_send_keys('organization:iwc-workflows')
|
||||
self.components.trs_search.search_result(workflow_name=TRS_NAME).wait_for_and_click()
|
||||
self.components.trs_search.import_version(version="v0.4").wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.workflow_index_open()
|
||||
self.assert_workflow_imported(WORKFLOW_NAME)
|
||||
|
||||
def test_import_by_search_workflowhub(self):
|
||||
self.trs_search()
|
||||
self.components.trs_search.select_server_button.wait_for_and_click()
|
||||
|
||||
Reference in New Issue
Block a user