mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 10:24:38 +08:00
Initial selenium tests for workflow invocation export.
Test STS link generation of RO crates and native model store format.
This commit is contained in:
@@ -327,6 +327,7 @@ Examples of RDM repositories include [Zenodo](https://zenodo.org/), [Invenio RDM
|
||||
<BCard
|
||||
v-for="plugin in exportPlugins"
|
||||
:key="plugin.id"
|
||||
:data-invocation-export-type="plugin.id"
|
||||
class="wizard-selection-card"
|
||||
:border-variant="exportData.exportPluginFormat === plugin.id ? 'primary' : 'default'"
|
||||
@click="exportData.exportPluginFormat = plugin.id">
|
||||
@@ -350,6 +351,7 @@ Examples of RDM repositories include [Zenodo](https://zenodo.org/), [Invenio RDM
|
||||
<BCard
|
||||
v-for="target in exportDestinationTargets"
|
||||
:key="target.destination"
|
||||
:data-invocation-export-destination="target.destination"
|
||||
:border-variant="exportData.destination === target.destination ? 'primary' : 'default'"
|
||||
:header-bg-variant="exportData.destination === target.destination ? 'primary' : 'default'"
|
||||
:header-text-variant="exportData.destination === target.destination ? 'white' : 'default'"
|
||||
|
||||
@@ -334,7 +334,7 @@ function cancelWorkflowSchedulingLocal() {
|
||||
</template>
|
||||
<InvocationReport v-if="invocationStateSuccess" :invocation-id="invocation.id" />
|
||||
</BTab>
|
||||
<BTab title="Export" lazy>
|
||||
<BTab title="Export" title-item-class="invocation-export-tab" lazy>
|
||||
<div v-if="invocationAndJobTerminal">
|
||||
<WorkflowInvocationExportOptions :invocation-id="invocation.id" />
|
||||
</div>
|
||||
|
||||
@@ -886,6 +886,12 @@ invocations:
|
||||
step_job_details: '[data-step="${order_index}"] .invocation-step-job-details'
|
||||
step_job_information: '[data-step="${order_index}"] .invocation-step-job-details .info_data_table'
|
||||
step_job_information_tool_id: '[data-step="${order_index}"] .invocation-step-job-details .info_data_table #galaxy-tool-id'
|
||||
export_tab: '.invocation-export-tab'
|
||||
export_output_format: '[data-invocation-export-type="${type}"] .card-body'
|
||||
export_destination: '[data-invocation-export-destination="${destination}"] .card-body'
|
||||
wizard_next_button: '.wizard-actions .go-next-btn'
|
||||
wizard_export_button: '.wizard-actions .go-next-btn.btn-primary'
|
||||
export_download_link: '.download-link'
|
||||
|
||||
tour:
|
||||
popover:
|
||||
|
||||
@@ -1904,6 +1904,8 @@ class BaseWorkflowPopulator(BasePopulator):
|
||||
invocations = self.history_invocations(history_id)
|
||||
if len(invocations) == expected_invocation_count:
|
||||
return True
|
||||
elif len(invocations) > expected_invocation_count:
|
||||
raise AssertionError("More than the expect number of invocations found in workflow")
|
||||
|
||||
wait_on(invocation_count, f"{expected_invocation_count} history invocations")
|
||||
for invocation in self.history_invocations(history_id):
|
||||
|
||||
@@ -32,6 +32,52 @@ from .framework import (
|
||||
class TestWorkflowRun(SeleniumTestCase, UsesHistoryItemAssertions, RunsWorkflows):
|
||||
ensure_registered = True
|
||||
|
||||
@selenium_test
|
||||
@managed_history
|
||||
def test_workflow_export_file_native(self):
|
||||
self._setup_simple_invocation_for_export_testing()
|
||||
invocations = self.components.invocations
|
||||
invocations.export_tab.wait_for_and_click()
|
||||
self.screenshot("invocation_export_formats")
|
||||
invocations.export_output_format(type="ro-crate").wait_for_and_click()
|
||||
invocations.wizard_next_button.wait_for_and_click()
|
||||
download_option = invocations.export_destination(destination="download")
|
||||
download_option.wait_for_present()
|
||||
self.screenshot("invocation_export_rocrate_destinations")
|
||||
download_option.wait_for_and_click()
|
||||
invocations.wizard_next_button.wait_for_and_click()
|
||||
export_button = invocations.wizard_export_button
|
||||
export_button.wait_for_present()
|
||||
self.screenshot("invocation_export_rocrate_download_options")
|
||||
export_button.wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_TRANSITION)
|
||||
self.screenshot("invocation_export_crate_preparing_download")
|
||||
invocations.export_download_link.wait_for_present()
|
||||
self.screenshot("invocation_export_crate_download_ready")
|
||||
|
||||
@selenium_test
|
||||
@managed_history
|
||||
def test_workflow_export_file_native(self):
|
||||
self._setup_simple_invocation_for_export_testing()
|
||||
invocations = self.components.invocations
|
||||
invocations.export_tab.wait_for_and_click()
|
||||
self.screenshot("invocation_export_formats")
|
||||
invocations.export_output_format(type="default-file").wait_for_and_click()
|
||||
invocations.wizard_next_button.wait_for_and_click()
|
||||
download_option = invocations.export_destination(destination="download")
|
||||
download_option.wait_for_present()
|
||||
self.screenshot("invocation_export_native_destinations")
|
||||
download_option.wait_for_and_click()
|
||||
invocations.wizard_next_button.wait_for_and_click()
|
||||
export_button = invocations.wizard_export_button
|
||||
export_button.wait_for_present()
|
||||
self.screenshot("invocation_export_native_download_options")
|
||||
export_button.wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_TRANSITION)
|
||||
self.screenshot("invocation_export_native_preparing_download")
|
||||
invocations.export_download_link.wait_for_present()
|
||||
self.screenshot("invocation_export_native_download_ready")
|
||||
|
||||
@selenium_test
|
||||
@managed_history
|
||||
def test_simple_execution(self):
|
||||
@@ -376,3 +422,13 @@ steps: {}
|
||||
assert initial_value == "", initial_value
|
||||
input_element.clear()
|
||||
input_element.send_keys(value)
|
||||
|
||||
def _setup_simple_invocation_for_export_testing(self):
|
||||
# precondition: refresh history
|
||||
self.perform_upload(self.get_filename("1.fasta"))
|
||||
self.wait_for_history()
|
||||
self.workflow_run_open_workflow(WORKFLOW_SIMPLE_CAT_TWICE)
|
||||
self.workflow_run_submit()
|
||||
history_id = self.current_history_id()
|
||||
self.workflow_populator.wait_for_history_workflows(history_id, expected_invocation_count=1)
|
||||
return self.workflow_populator.history_invocations(history_id)[0]
|
||||
|
||||
Reference in New Issue
Block a user