Skip to content
Snippets Groups Projects
Commit 13af1f73 authored by Tobias Reischmann's avatar Tobias Reischmann
Browse files

Fixed all behat test cases to meet requirements of multiple trigger

parent b6bcdc5d
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ $string['adminsettings_workflow_definition_steps_heading'] = 'Workflow Steps';
$string['adminsettings_edit_trigger_instance_heading'] = 'Trigger for workflow \'{$a}\'';
$string['adminsettings_edit_step_instance_heading'] = 'Step Instance for workflow \'{$a}\'';
$string['add_new_step_instance'] = 'Add New Step Instance...';
$string['add_new_trigger_instance'] = 'Add New Trigger...';
$string['add_new_trigger_instance'] = 'Add New Trigger Instance...';
$string['step_settings_header'] = 'Specific settings of the step type';
$string['trigger_settings_header'] = 'Specific settings of the trigger type';
$string['general_settings_header'] = 'General Settings';
......
......@@ -10,20 +10,19 @@ Feature: Add a workflow definition activate it
| Title | My Workflow |
| Displayed workflow title | Teachers view on workflow |
When I press "Save changes"
Then I should see "Workflow Steps"
When I select "Start date delay trigger" from the "triggername" singleselect
Then I should see "Trigger for workflow 'My Workflow'"
And I should see "Specific settings of the trigger type"
When I set the following fields to these values:
| Instance Name | My Trigger |
| Subplugin Name | Start date delay trigger |
And I press "reload"
Then I should see "Specific settings of the trigger type"
When I set the following fields to these values:
| instancename | delay trigger |
| delay[number] | 2 |
| delay[timeunit] | days |
And I press "Save changes"
Then I should see "Workflow Steps"
And I should see "Add New Step Instance"
And I should see "Start date delay trigger"
When I select "Email Step" from the "subpluginname" singleselect
When I select "Email Step" from the "stepname" singleselect
And I set the following fields to these values:
| Instance Name | Email Step |
| responsetimeout[number] | 14 |
......@@ -32,10 +31,10 @@ Feature: Add a workflow definition activate it
| Content Template | Content |
| Content HTML Template | Content HTML |
And I press "Save changes"
And I select "Create Backup Step" from the "subpluginname" singleselect
And I select "Create Backup Step" from the "stepname" singleselect
And I set the field "Instance Name" to "Create Backup Step"
And I press "Save changes"
And I select "Delete Course Step" from the "subpluginname" singleselect
And I select "Delete Course Step" from the "stepname" singleselect
And I set the field "Instance Name" to "Delete Course 2"
And I press "Save changes"
And I press "Back"
......
......@@ -10,10 +10,11 @@ Feature: Add a workflow definition
| Title | My Workflow |
| Displayed workflow title | Teachers view on workflow |
When I press "Save changes"
Then I should see "Workflow Steps"
When I select "Manual trigger" from the "triggername" singleselect
Then I should see "Trigger for workflow 'My Workflow'"
When I set the following fields to these values:
| Instance Name | My Trigger |
| Subplugin Name | Manual trigger |
And I press "Save changes"
# The manual trigger requires additional settings. For that reason the form reloads with some more fields.
Then I should see "Required"
......@@ -37,19 +38,16 @@ Feature: Add a workflow definition
| Title | My Workflow |
| Displayed workflow title | Teachers view on workflow |
When I press "Save changes"
Then I should see "Trigger for workflow 'My Workflow'"
When I set the following fields to these values:
Then I should see "Workflow Steps"
When I select "Start date delay trigger" from the "triggername" singleselect
And I set the following fields to these values:
| Instance Name | My Trigger |
| Subplugin Name | Start date delay trigger |
And I press "reload"
Then I should see "Specific settings of the trigger type"
When I set the following fields to these values:
| delay[number] | 2 |
| delay[timeunit] | days |
And I press "Save changes"
Then I should see "Workflow Steps"
And I should see "Start date delay trigger"
When I select "Delete Course Step" from the "subpluginname" singleselect
When I select "Delete Course Step" from the "stepname" singleselect
And I set the field "Instance Name" to "Delete Course"
And I press "Save changes"
Then I should see "Workflow Steps"
......@@ -63,13 +61,10 @@ Feature: Add a workflow definition
| Title | My Workflow |
| Displayed workflow title | Teachers view on workflow |
When I press "Save changes"
Then I should see "Trigger for workflow 'My Workflow'"
When I set the following fields to these values:
Then I should see "Workflow Steps"
When I select "Start date delay trigger" from the "triggername" singleselect
And I set the following fields to these values:
| Instance Name | My Trigger |
| Subplugin Name | Start date delay trigger |
And I press "reload"
Then I should see "Specific settings of the trigger type"
When I set the following fields to these values:
| delay[number] | 2 |
| delay[timeunit] | days |
And I press "Save changes"
......@@ -78,26 +73,18 @@ Feature: Add a workflow definition
When I click on the tool "Edit" in the "Trigger" row of the "tool_lifecycle_workflows" table
Then the following fields match these values:
| Instance Name | My Trigger |
| Subplugin Name | Start date delay trigger |
| delay[number] | 2 |
| delay[timeunit] | days |
When I set the following fields to these values:
| Subplugin Name | Manual trigger |
And I press "reload"
And I set the following fields to these values:
| Instance Name | My updated Trigger |
| Icon | t/delete |
| Action name | Delete course |
| Capability | moodle/course:manageactivities |
| Instance Name | Other Trigger |
| delay[number] | 4 |
| delay[timeunit] | weeks |
And I press "Save changes"
Then I should see "Manual trigger"
When I click on the tool "Edit" in the "Trigger" row of the "tool_lifecycle_workflows" table
Then the following fields match these values:
| Instance Name | My updated Trigger |
| Subplugin Name | Manual trigger |
| Icon | t/delete |
| Action name | Delete course |
| Capability | moodle/course:manageactivities |
| Instance Name | Other Trigger |
| delay[number] | 4 |
| delay[timeunit] | weeks |
Scenario: Add a new workflow definition with steps and rearange
Given I log in as "admin"
......@@ -107,25 +94,22 @@ Feature: Add a workflow definition
| Title | My Workflow |
| Displayed workflow title | Teachers view on workflow |
When I press "Save changes"
Then I should see "Trigger for workflow 'My Workflow'"
When I set the following fields to these values:
Then I should see "Workflow Steps"
When I select "Start date delay trigger" from the "triggername" singleselect
And I set the following fields to these values:
| Instance Name | My Trigger |
| Subplugin Name | Start date delay trigger |
And I press "reload"
Then I should see "Specific settings of the trigger type"
When I set the following fields to these values:
| delay[number] | 2 |
| delay[timeunit] | days |
And I press "Save changes"
Then I should see "Workflow Steps"
And I should see "Start date delay trigger"
When I select "Delete Course Step" from the "subpluginname" singleselect
When I select "Delete Course Step" from the "stepname" singleselect
And I set the field "Instance Name" to "Delete Course 1"
And I press "Save changes"
And I select "Delete Course Step" from the "subpluginname" singleselect
And I select "Delete Course Step" from the "stepname" singleselect
And I set the field "Instance Name" to "Delete Course 2"
And I press "Save changes"
And I select "Create Backup Step" from the "subpluginname" singleselect
And I select "Create Backup Step" from the "stepname" singleselect
And I set the field "Instance Name" to "Create Backup Step"
And I press "Save changes"
Then the step "Delete Course 1" should be at the 1 position
......
......@@ -22,15 +22,13 @@ Feature: Add a workflow with an email step and test the interaction as a teacher
| Title | My Workflow |
| Displayed workflow title | Teachers view on workflow |
And I press "Save changes"
And I select "Start date delay trigger" from the "triggername" singleselect
And I set the following fields to these values:
| Instance Name | My Trigger |
| Subplugin Name | Start date delay trigger |
And I press "reload"
And I set the following fields to these values:
| delay[number] | 3 |
| delay[timeunit] | days |
And I press "Save changes"
And I select "Email Step" from the "subpluginname" singleselect
And I select "Email Step" from the "stepname" singleselect
And I set the following fields to these values:
| Instance Name | Email Step |
| responsetimeout[number] | 8 |
......@@ -39,7 +37,7 @@ Feature: Add a workflow with an email step and test the interaction as a teacher
| Content Template | Content |
| Content HTML Template | Content HTML |
And I press "Save changes"
And I select "Delete Course Step" from the "subpluginname" singleselect
And I select "Delete Course Step" from the "stepname" singleselect
And I set the field "Instance Name" to "Delete Course 2"
And I press "Save changes"
And I press "Back"
......
......@@ -18,17 +18,14 @@ Feature: Add a workflow with a manual trigger and a duplicate step and test the
| Title | My Workflow |
| Displayed workflow title | Teachers view on workflow |
And I press "Save changes"
And I select "Manual trigger" from the "triggername" singleselect
And I set the following fields to these values:
| Instance Name | My Trigger |
| Subplugin Name | Manual trigger |
And I press "reload"
And I should see "Specific settings of the trigger type"
And I set the following fields to these values:
| Icon | t/delete |
| Action name | Duplicate course |
| Capability | moodle/course:manageactivities |
And I press "Save changes"
And I select "Duplicate Step" from the "subpluginname" singleselect
And I select "Duplicate Step" from the "stepname" singleselect
And I set the following fields to these values:
| Instance Name | Duplicate Step |
And I press "Save changes"
......
......@@ -29,12 +29,9 @@ Feature: Add a manual trigger and test view and actions as a teacher
| Title | My Workflow |
| Displayed workflow title | Teachers view on workflow |
And I press "Save changes"
And I select "Manual trigger" from the "triggername" singleselect
And I set the following fields to these values:
| Instance Name | My Trigger |
| Subplugin Name | Manual trigger |
And I press "reload"
And I should see "Specific settings of the trigger type"
And I set the following fields to these values:
| Icon | t/delete |
| Action name | Delete course |
| Capability | moodle/course:manageactivities |
......@@ -59,20 +56,17 @@ Feature: Add a manual trigger and test view and actions as a teacher
| Title | My Workflow |
| Displayed workflow title | Teachers view on workflow |
And I press "Save changes"
And I select "Manual trigger" from the "triggername" singleselect
And I set the following fields to these values:
| Instance Name | My Trigger |
| Subplugin Name | Manual trigger |
And I press "reload"
And I should see "Specific settings of the trigger type"
And I set the following fields to these values:
| Icon | t/delete |
| Action name | Delete course |
| Capability | moodle/course:manageactivities |
And I press "Save changes"
And I select "Create Backup Step" from the "subpluginname" singleselect
And I select "Create Backup Step" from the "stepname" singleselect
And I set the field "Instance Name" to "Create Backup Step"
And I press "Save changes"
And I select "Delete Course Step" from the "subpluginname" singleselect
And I select "Delete Course Step" from the "stepname" singleselect
And I set the field "Instance Name" to "Delete Course 2"
And I press "Save changes"
And I press "Back"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment