MDL-54640 behat: add 1 sec delay before running tasks

Also just execute task, as running whole cron is not
required
This commit is contained in:
Rajesh Taneja 2016-05-19 16:03:21 +08:00 committed by David Monllao
parent 33892edf18
commit 442a3651ec
3 changed files with 15 additions and 6 deletions

View File

@ -39,7 +39,10 @@ Feature: Enable Block Completion in a course using manual completion by others
And I follow "Course 1"
And I navigate to "Course completion" node in "Reports"
And I follow "Click to mark user complete"
And I trigger cron
# Running completion task just after clicking sometimes fail, as record
# should be created before the task runs.
And I wait "1" seconds
And I run the scheduled task "core\task\completion_regular_task"
And I am on site homepage
And I log out
And I log in as "student1"
@ -87,7 +90,10 @@ Feature: Enable Block Completion in a course using manual completion by others
And I follow "Course 1"
And I navigate to "Course completion" node in "Reports"
And I follow "Click to mark user complete"
And I trigger cron
# Running completion task just after clicking sometimes fail, as record
# should be created before the task runs.
And I wait "1" seconds
And I run the scheduled task "core\task\completion_regular_task"
And I am on site homepage
And I log out
And I log in as "student1"

View File

@ -35,7 +35,10 @@ Feature: Enable Block Completion in a course using manual self completion
And I should see "Confirm self completion"
And I press "Yes"
And I should see "Status: In progress" in the "Course completion status" "block"
And I trigger cron
# Running completion task just after clicking sometimes fail, as record
# should be created before the task runs.
And I wait "1" seconds
And I run the scheduled task "core\task\completion_regular_task"
And I am on site homepage
And I follow "Course 1"
Then I should see "Status: Complete" in the "Course completion status" "block"

View File

@ -37,10 +37,10 @@ Feature: Allow teachers to manually mark users as complete when configured
And I follow "View course report"
And I should see "Student First"
And I follow "Click to mark user complete"
# Running cron just after clicking sometimes fail, as record
# should be created before the cron runs.
# Running completion task just after clicking sometimes fail, as record
# should be created before the task runs.
And I wait "1" seconds
And I trigger cron
And I run the scheduled task "core\task\completion_regular_task"
And I am on site homepage
And I log out
Then I log in as "student1"