From e917a595b2b772580d6da79d93ddc6f10b0989ca Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Wed, 27 May 2020 17:55:32 +0200 Subject: [PATCH] MDL-68846 behat: Avoid asserting AM/PM strings. They are not cross-os The exists/contains steps of behat are case-sensitive, in the other side, depending of the OS and locales, time functions are not 100% consistent. See https://bugs.php.net/bug.php?id=76378 for example. So only solutions are: 1) Create a specific new step performing the checks case insensitively. 2) Avoid making AM / PM part of the checks. Here we have opted by the 2nd approach, it's not critical part to check. --- .../summary/tests/behat/summary_data_post_dates.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/forum/report/summary/tests/behat/summary_data_post_dates.feature b/mod/forum/report/summary/tests/behat/summary_data_post_dates.feature index c1834066f93..2ba91a418e7 100644 --- a/mod/forum/report/summary/tests/behat/summary_data_post_dates.feature +++ b/mod/forum/report/summary/tests/behat/summary_data_post_dates.feature @@ -47,9 +47,9 @@ Feature: Post date columns data available And I am on "Course 1" course homepage And I follow "forum1" And I navigate to "Summary report" in current page administration - Then "Teacher 1" row "Earliest post" column of "forumreport_summary_table" table should contain "Tuesday, 2 January 2018, 9:00 AM" - Then "Teacher 1" row "Most recent post" column of "forumreport_summary_table" table should contain "Sunday, 1 September 2019, 7:00 AM" - Then "Student 1" row "Earliest post" column of "forumreport_summary_table" table should contain "Wednesday, 27 March 2019, 4:00 AM" - Then "Student 1" row "Most recent post" column of "forumreport_summary_table" table should contain "Wednesday, 27 March 2019, 1:00 PM" + Then "Teacher 1" row "Earliest post" column of "forumreport_summary_table" table should contain "Tuesday, 2 January 2018, 9:00" + Then "Teacher 1" row "Most recent post" column of "forumreport_summary_table" table should contain "Sunday, 1 September 2019, 7:00" + Then "Student 1" row "Earliest post" column of "forumreport_summary_table" table should contain "Wednesday, 27 March 2019, 4:00" + Then "Student 1" row "Most recent post" column of "forumreport_summary_table" table should contain "Wednesday, 27 March 2019, 1:00" Then "Student 2" row "Earliest post" column of "forumreport_summary_table" table should contain "-" Then "Student 2" row "Most recent post" column of "forumreport_summary_table" table should contain "-"