diff --git a/lib/tests/behat/behat_hooks.php b/lib/tests/behat/behat_hooks.php index e7f64f0b77f..6e2653f9ed6 100644 --- a/lib/tests/behat/behat_hooks.php +++ b/lib/tests/behat/behat_hooks.php @@ -193,6 +193,9 @@ class behat_hooks extends behat_base { behat_context_helper::set_session($session); } + // Reset mink session between the scenarios. + $session->reset(); + // Reset $SESSION. \core\session\manager::init_empty_session(); diff --git a/mod/wiki/tests/behat/wiki_comments.feature b/mod/wiki/tests/behat/wiki_comments.feature index 4ffa1a1aed7..afd3b499c82 100644 --- a/mod/wiki/tests/behat/wiki_comments.feature +++ b/mod/wiki/tests/behat/wiki_comments.feature @@ -40,6 +40,7 @@ Feature: Users can comment on wiki pages And I set the following fields to these values: | Comment | student 1 original comment | And I press "Save" + And I wait to be redirected @javascript Scenario: Student can edit and delete their own comment