diff --git a/client/src/components/Workflow/Invocation/Export/InvocationExportWizard.vue b/client/src/components/Workflow/Invocation/Export/InvocationExportWizard.vue index dcfa04e4f770..23c6d1d0c8dd 100644 --- a/client/src/components/Workflow/Invocation/Export/InvocationExportWizard.vue +++ b/client/src/components/Workflow/Invocation/Export/InvocationExportWizard.vue @@ -327,6 +327,7 @@ Examples of RDM repositories include [Zenodo](https://zenodo.org/), [Invenio RDM @@ -350,6 +351,7 @@ Examples of RDM repositories include [Zenodo](https://zenodo.org/), [Invenio RDM - +
diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml index 0612bdf75aff..7ff7c4d409f3 100644 --- a/client/src/utils/navigation/navigation.yml +++ b/client/src/utils/navigation/navigation.yml @@ -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: diff --git a/lib/galaxy_test/base/populators.py b/lib/galaxy_test/base/populators.py index 4f6ecfcff025..97444421a1c1 100644 --- a/lib/galaxy_test/base/populators.py +++ b/lib/galaxy_test/base/populators.py @@ -1904,6 +1904,8 @@ def invocation_count(): 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): diff --git a/lib/galaxy_test/selenium/test_workflow_run.py b/lib/galaxy_test/selenium/test_workflow_run.py index 5405545ce2e1..c0bc4ac41051 100644 --- a/lib/galaxy_test/selenium/test_workflow_run.py +++ b/lib/galaxy_test/selenium/test_workflow_run.py @@ -32,6 +32,81 @@ class TestWorkflowRun(SeleniumTestCase, UsesHistoryItemAssertions, RunsWorkflows): ensure_registered = True + @selenium_test + @managed_history + def test_workflow_export_file_ro_crate(self): + 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) + invocation_0 = self.workflow_populator.history_invocations(history_id)[0] + 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_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_download_options") + export_button.wait_for_and_click() + self.sleep_for(self.wait_types.UX_TRANSITION) + self.screenshot("invocation_export_preparing_download") + invocations.export_download_link.wait_for_present() + self.screenshot("invocation_export_download_ready") + + @selenium_test + @managed_history + def test_workflow_export_file_ro_crate(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 +451,13 @@ def _set_replacement_parameter(self, element_id, value): 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]