From e2e37bc5102d3b7319f6e20faeb69e0e6e5d7ce0 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Tue, 26 May 2015 15:48:54 +0800 Subject: [PATCH] MDL-49806 behat: Ensure user is marked complete before runnning cron --- completion/tests/behat/teacher_manual_completion.feature | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/completion/tests/behat/teacher_manual_completion.feature b/completion/tests/behat/teacher_manual_completion.feature index d8a50907f7149..3b8c4d4f391c3 100644 --- a/completion/tests/behat/teacher_manual_completion.feature +++ b/completion/tests/behat/teacher_manual_completion.feature @@ -41,6 +41,12 @@ 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, so navigate back + # and ensure the student completion is updated before running cron. + And I am on site homepage + And I follow "Completion course" + And I follow "View course report" + And "//img[contains(@alt, 'Completed')]" "xpath_element" should exist in the "student1" "table_row" And I trigger cron And I am on site homepage And I log out