Files
moodle/admin/tool/task/tests/behat/delete_task.feature
T
waleedhassan c0572a0423 MDL-81780 tool_task : Adhoc task improvements
Added fail delay column in the adhock task table on the admin page,
Added a new column for a delete action for the adhoc tasks on and
Wrote delete_adhoctask.php for delete functionality of adhoc tasks.
Wrote behat test for the delete functionality. Also there was a
logical error in the previous code where it was checking if the task
is due or not and it was just showing Never or ASAP instead of
actual time so fixed that as well.
2025-01-16 12:16:04 +00:00

22 lines
1.0 KiB
Gherkin

@tool @tool_task @javascript
Feature: Delete an adhoc task
In order to manage adhoc tasks
As an admin
I need to be able to delete adhoc tasks
Scenario: Delete an existing adhoc task
Given I log in as "admin"
And the following "tool_task > adhoc tasks" exist:
| classname | seconds | hostname | pid |
| \core\task\asynchronous_backup_task | 7201 | c69335460f7f | 1915 |
| \core\task\asynchronous_restore_task | 172800 | c69335460f7f | 1916 |
And I navigate to "Server > Tasks > Ad hoc tasks" in site administration
Then "asynchronous_backup_task" "table_row" should exist
And "asynchronous_restore_task" "table_row" should exist
And I follow "asynchronous_backup_task"
When I follow "Delete"
And I click on "Delete" "button" in the ".modal-dialog" "css_element"
Then I navigate to "Server > Tasks > Ad hoc tasks" in site administration
And "asynchronous_backup_task" "table_row" should not exist
And "asynchronous_restore_task" "table_row" should exist