mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add test case
This commit is contained in:
@@ -650,12 +650,16 @@ workflow_run:
|
||||
# TODO: put step labels in the DOM ideally
|
||||
subworkflow_step_icon: ".portlet-title-icon.fa-sitemap"
|
||||
run_workflow: "#run-workflow"
|
||||
run_workflow_disabled: "#run-workflow.disabled"
|
||||
validation_error: ".validation-error"
|
||||
expand_form_link: '.workflow-expand-form-link'
|
||||
expanded_form: '.workflow-expanded-form'
|
||||
new_history_target_link: '.workflow-new-history-target-link'
|
||||
runtime_setting_button: '.workflow-run-settings'
|
||||
runtime_setting_target: '.workflow-run-settings-target'
|
||||
simplified_input:
|
||||
type: xpath
|
||||
selector: //div[@data-label="${label}"]//input
|
||||
input_select_field:
|
||||
type: xpath
|
||||
selector: '//div[@data-label="${label}"]//div[contains(@class, "multiselect")]'
|
||||
|
||||
@@ -277,6 +277,37 @@ steps:
|
||||
)
|
||||
self.workflow_populator.wait_for_history_workflows(history_id, expected_invocation_count=1)
|
||||
|
||||
@selenium_test
|
||||
@managed_history
|
||||
def test_workflow_run_button_disabled_when_required_input_missing(self):
|
||||
self.workflow_run_open_workflow(
|
||||
"""
|
||||
class: GalaxyWorkflow
|
||||
inputs:
|
||||
text_param:
|
||||
type: text
|
||||
optional: false
|
||||
data_param:
|
||||
type: data
|
||||
collection_param:
|
||||
type: data_collection
|
||||
steps: {}
|
||||
"""
|
||||
)
|
||||
workflow_run = self.components.workflow_run
|
||||
# None of the required parameters are present
|
||||
workflow_run.run_workflow_disabled.wait_for_present()
|
||||
# upload datasets and collections
|
||||
history_id = self.current_history_id()
|
||||
self.dataset_populator.new_dataset(history_id, wait=True)
|
||||
self.dataset_collection_populator.create_list_in_history(history_id, wait=True)
|
||||
input_element = workflow_run.simplified_input(label="text_param").wait_for_and_click()
|
||||
input_element.send_keys("3")
|
||||
# Everything is set, workflow is runnable, disabled class should be removed
|
||||
workflow_run.run_workflow_disabled.wait_for_absent()
|
||||
input_element.clear()
|
||||
workflow_run.run_workflow_disabled.wait_for_present()
|
||||
|
||||
def _assert_has_3_lines_after_run(self, hid):
|
||||
self.workflow_run_wait_for_ok(hid=hid)
|
||||
history_id = self.current_history_id()
|
||||
|
||||
Reference in New Issue
Block a user