diff --git a/mod/forum/tests/behat/discussion_navigation.feature b/mod/forum/tests/behat/discussion_navigation.feature index 4caa84a708139..045547a63d0b1 100644 --- a/mod/forum/tests/behat/discussion_navigation.feature +++ b/mod/forum/tests/behat/discussion_navigation.feature @@ -51,6 +51,11 @@ Feature: A user can navigate to previous and next discussions And I follow "Reply" And I set the following fields to these values: | Message | Answer to discussion | + # We need to wait a bit to guarantee that the post is created after the previous ones. + # because there is a bug in the forum_get_discussion_neighbours() when all the discussion + # last modified times are the same. See MDL-79247 for more details. Once that bug is fixed + # we can remove this wait. + And I wait "1" seconds And I press "Post to forum" And I should not see "Discussion 2" And I should see "Discussion 3"