From a3f16eb4ea55c836f3e08e2d3ba21812e2678dd4 Mon Sep 17 00:00:00 2001 From: Michael Hawkins Date: Wed, 13 Feb 2019 16:47:46 +0800 Subject: [PATCH] MDL-63892 mod_forum: Behat update for post order --- mod/forum/tests/behat/posts_ordering_general.feature | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mod/forum/tests/behat/posts_ordering_general.feature b/mod/forum/tests/behat/posts_ordering_general.feature index a5ae1d6f8f8..c1ea440f368 100644 --- a/mod/forum/tests/behat/posts_ordering_general.feature +++ b/mod/forum/tests/behat/posts_ordering_general.feature @@ -71,14 +71,14 @@ Feature: New discussions and discussions with recently added replies are display And I am on "Course 1" course homepage And I follow "Course general forum" # - # Make sure the order of the forum posts is as expected (most recently participated first). + # Make sure the order of the forum posts is as expected, with most recent new participation first (ie excluding edits). # - Then I should see "Forum post 3" in the "//tr[contains(concat(' ', normalize-space(@class), ' '), ' discussion ')][position()=3]" "xpath_element" - And I should see "Edited forum post 2" in the "//tr[contains(concat(' ', normalize-space(@class), ' '), ' discussion ')][position()=2]" "xpath_element" - And I should see "Forum post 1" in the "//tr[contains(concat(' ', normalize-space(@class), ' '), ' discussion ')][position()=1]" "xpath_element" + Then I should see "Forum post 1" in the "//tr[contains(concat(' ', normalize-space(@class), ' '), ' discussion ')][position()=1]" "xpath_element" + And I should see "Forum post 3" in the "//tr[contains(concat(' ', normalize-space(@class), ' '), ' discussion ')][position()=2]" "xpath_element" + And I should see "Edited forum post 2" in the "//tr[contains(concat(' ', normalize-space(@class), ' '), ' discussion ')][position()=3]" "xpath_element" # # Make sure the next/prev navigation uses the same order of the posts. # - And I follow "Edited forum post 2" + And I follow "Forum post 3" And "//a[@aria-label='Next discussion: Forum post 1']" "xpath_element" should exist - And "//a[@aria-label='Previous discussion: Forum post 3']" "xpath_element" should exist + And "//a[@aria-label='Previous discussion: Edited forum post 2']" "xpath_element" should exist