diff --git a/lib/tests/behat/datetime_any.feature b/lib/tests/behat/datetime_any.feature index 385b26363ae..cfae8b17e52 100644 --- a/lib/tests/behat/datetime_any.feature +++ b/lib/tests/behat/datetime_any.feature @@ -23,12 +23,12 @@ Feature: Any day / month / year combination in date form elements works ok. And the activity date in "Assignment 01" should contain "" Examples: - | initial_date | final_date | date_result | case_explanation (times Australia/Perth) | - | ##today## | ##tomorrow noon## | ##tomorrow noon##%A, %d %B %Y, %I:%M %p## | change of day, any day, back and forth | - | ##tomorrow## | ##today noon## | ##today noon##%A, %d %B %Y, %I:%M %p## | | - | 1617256800 | 1617170400 | Wednesday, 31 March 2021, 2:00 PM | change of month, back and forth | - | 1617170400 | 1617256800 | Thursday, 1 April 2021, 2:00 PM | | - | 1740808800 | 1709186400 | Thursday, 29 February 2024, 2:00 PM | change of month, leap year, back and forth | - | 1709186400 | 1740808800 | Saturday, 1 March 2025, 2:00 PM | | - | 1577858400 | 1577772000 | Tuesday, 31 December 2019, 2:00 PM | change of year, back and forth | - | 1577772000 | 1577858400 | Wednesday, 1 January 2020, 2:00 PM | | + | initial_date | final_date | date_result | case_explanation (times Australia/Perth) | + | ##today## | ##tomorrow noon## | ##tomorrow noon##%A, %d %B %Y, %I:%M## | change of day, any day, back and forth | + | ##tomorrow## | ##today noon## | ##today noon##%A, %d %B %Y, %I:%M## | | + | 1617256800 | 1617170400 | Wednesday, 31 March 2021, 2:00 | change of month, back and forth | + | 1617170400 | 1617256800 | Thursday, 1 April 2021, 2:00 | | + | 1740808800 | 1709186400 | Thursday, 29 February 2024, 2:00 | change of month, leap year, back and forth | + | 1709186400 | 1740808800 | Saturday, 1 March 2025, 2:00 | | + | 1577858400 | 1577772000 | Tuesday, 31 December 2019, 2:00 | change of year, back and forth | + | 1577772000 | 1577858400 | Wednesday, 1 January 2020, 2:00 | | diff --git a/mod/assign/tests/behat/assign_group_override.feature b/mod/assign/tests/behat/assign_group_override.feature index 5fc69671154..aed716143ea 100644 --- a/mod/assign/tests/behat/assign_group_override.feature +++ b/mod/assign/tests/behat/assign_group_override.feature @@ -93,12 +93,12 @@ Feature: Assign group override And I log in as "student2" And I am on "Course 1" course homepage And I follow "Test assignment name" - Then the activity date in "Test assignment name" should contain "Due: Saturday, 1 January 2000, 8:00 AM" + Then the activity date in "Test assignment name" should contain "Due: Saturday, 1 January 2000, 8:00" And I log out And I log in as "student1" And I am on "Course 1" course homepage And I follow "Test assignment name" - And the activity date in "Test assignment name" should contain "Due: Wednesday, 1 January 2020, 8:00 AM" + And the activity date in "Test assignment name" should contain "Due: Wednesday, 1 January 2020, 8:00" Scenario: Allow a group to have a different cut off date Given I log in as "teacher1" @@ -149,13 +149,13 @@ Feature: Assign group override And I log in as "student2" And I am on "Course 1" course homepage And I follow "Test assignment name" - Then the activity date in "Test assignment name" should contain "Opens: Tuesday, 1 January 2030, 8:00 AM" + Then the activity date in "Test assignment name" should contain "Opens: Tuesday, 1 January 2030, 8:00" And I should not see "Add submission" And I log out And I log in as "student1" And I am on "Course 1" course homepage And I follow "Test assignment name" - And I should not see "Tuesday, 1 January 2030, 8:00 AM" + And I should not see "Tuesday, 1 January 2030, 8:00" @javascript Scenario: Add both a user and group override and verify that both are applied correctly @@ -187,17 +187,17 @@ Feature: Assign group override Then I log in as "student1" And I am on "Course 1" course homepage And I follow "Test assignment name" - And the activity date in "Test assignment name" should contain "Opens: Wednesday, 1 January 2031, 8:00 AM" + And the activity date in "Test assignment name" should contain "Opens: Wednesday, 1 January 2031, 8:00" And I log out And I log in as "student2" And I am on "Course 1" course homepage And I follow "Test assignment name" - And the activity date in "Test assignment name" should contain "Opens: Sunday, 1 January 2040, 8:00 AM" + And the activity date in "Test assignment name" should contain "Opens: Sunday, 1 January 2040, 8:00" And I log out And I log in as "student3" And I am on "Course 1" course homepage And I follow "Test assignment name" - And the activity date in "Test assignment name" should contain "Opens: Tuesday, 1 January 2030, 8:00 AM" + And the activity date in "Test assignment name" should contain "Opens: Tuesday, 1 January 2030, 8:00" Scenario: Override a group when teacher is in no group, and does not have accessallgroups permission, and the activity's group mode is "separate groups" Given the following "permission overrides" exist: diff --git a/mod/assign/tests/behat/assign_user_override.feature b/mod/assign/tests/behat/assign_user_override.feature index 0e848919781..edb875f17d5 100644 --- a/mod/assign/tests/behat/assign_user_override.feature +++ b/mod/assign/tests/behat/assign_user_override.feature @@ -85,12 +85,12 @@ Feature: Assign user override And I log in as "student2" And I am on "Course 1" course homepage And I follow "Test assignment name" - Then the activity date in "Test assignment name" should contain "Due: Saturday, 1 January 2000, 8:00 AM" + Then the activity date in "Test assignment name" should contain "Due: Saturday, 1 January 2000, 8:00" And I log out And I log in as "student1" And I am on "Course 1" course homepage And I follow "Test assignment name" - And the activity date in "Test assignment name" should contain "Due: Wednesday, 1 January 2020, 8:00 AM" + And the activity date in "Test assignment name" should contain "Due: Wednesday, 1 January 2020, 8:00" @javascript Scenario: Allow a user to have a different cut off date @@ -143,12 +143,12 @@ Feature: Assign user override And I log in as "student2" And I am on "Course 1" course homepage And I follow "Test assignment name" - Then the activity date in "Test assignment name" should contain "Opens: Tuesday, 1 January 2030, 8:00 AM" + Then the activity date in "Test assignment name" should contain "Opens: Tuesday, 1 January 2030, 8:00" And I log out And I log in as "student1" And I am on "Course 1" course homepage And I follow "Test assignment name" - And I should not see "1 January 2030, 8:00 AM" + And I should not see "1 January 2030, 8:00" Scenario: Override a user when teacher is in no group, and does not have accessallgroups permission, and the activity's group mode is "separate groups" Given the following "permission overrides" exist: diff --git a/mod/assign/tests/behat/relative_dates.feature b/mod/assign/tests/behat/relative_dates.feature index d42d2de6ee6..1ba4b665e1c 100644 --- a/mod/assign/tests/behat/relative_dates.feature +++ b/mod/assign/tests/behat/relative_dates.feature @@ -56,7 +56,7 @@ I should be able to create an assignment with a due date relative to the course When I log in as "student1" And I am on "Course 1" course homepage And I follow "Test assignment name" - Then the activity date in "Test assignment name" should contain "Due: Thursday, 7 January 2021, 8:00 AM" + Then the activity date in "Test assignment name" should contain "Due: Thursday, 7 January 2021, 8:00" Scenario: As a teacher, I should see the relative dates when reviewing assignment submissions Given the following config values are set as admin: diff --git a/mod/assign/tests/behat/set_availability.feature b/mod/assign/tests/behat/set_availability.feature index 6cebe0a5131..6d2719130f2 100644 --- a/mod/assign/tests/behat/set_availability.feature +++ b/mod/assign/tests/behat/set_availability.feature @@ -44,7 +44,7 @@ Feature: Set availability dates for an assignment When I follow "Assignment name" Then "Add submission" "button" should not exist And the activity date in "Assignment name" should contain "Opens:" - And the activity date in "Assignment name" should contain "##tomorrow noon##%A, %d %B %Y, %I:%M %p##" + And the activity date in "Assignment name" should contain "##tomorrow noon##%A, %d %B %Y, %I:%M##" Scenario: Student can see the assignment's due date in the course calendar Given I log in as "teacher1" diff --git a/mod/lesson/tests/behat/date_availability.feature b/mod/lesson/tests/behat/date_availability.feature index dab2f51f8b8..f92ecb9ae26 100644 --- a/mod/lesson/tests/behat/date_availability.feature +++ b/mod/lesson/tests/behat/date_availability.feature @@ -45,7 +45,7 @@ Feature: A teacher can set available from and deadline dates to access a lesson And I log in as "student1" And I am on "Course 1" course homepage When I follow "Test lesson" - Then the activity date in "Test lesson" should contain "Opens: Tuesday, 1 January 2030, 8:00 AM" + Then the activity date in "Test lesson" should contain "Opens: Tuesday, 1 January 2030, 8:00" And I should not see "First page contents" Scenario: Forbidding lesson accesses after a specified date @@ -74,5 +74,5 @@ Feature: A teacher can set available from and deadline dates to access a lesson And I log in as "student1" And I am on "Course 1" course homepage When I follow "Test lesson" - Then the activity date in "Test lesson" should contain "Closed: Saturday, 1 January 2000, 8:00 AM" + Then the activity date in "Test lesson" should contain "Closed: Saturday, 1 January 2000, 8:00" And I should not see "First page contents" diff --git a/mod/lesson/tests/behat/lesson_group_override.feature b/mod/lesson/tests/behat/lesson_group_override.feature index 3071b888d8b..161ea9fb640 100644 --- a/mod/lesson/tests/behat/lesson_group_override.feature +++ b/mod/lesson/tests/behat/lesson_group_override.feature @@ -216,7 +216,7 @@ Feature: Lesson group override And I log in as "student2" And I am on "Course 1" course homepage And I follow "Test lesson name" - Then the activity date in "Test lesson name" should contain "Closed: Saturday, 1 January 2000, 8:00 AM" + Then the activity date in "Test lesson name" should contain "Closed: Saturday, 1 January 2000, 8:00" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" @@ -253,7 +253,7 @@ Feature: Lesson group override And I log in as "student2" And I am on "Course 1" course homepage And I follow "Test lesson name" - Then the activity date in "Test lesson name" should contain "Opens: Tuesday, 1 January 2030, 8:00 AM" + Then the activity date in "Test lesson name" should contain "Opens: Tuesday, 1 January 2030, 8:00" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" @@ -346,17 +346,17 @@ Feature: Lesson group override Then I log in as "student1" And I am on "Course 1" course homepage And I follow "Test lesson name" - And the activity date in "Test lesson name" should contain "Opens: Wednesday, 1 January 2031, 8:00 AM" + And the activity date in "Test lesson name" should contain "Opens: Wednesday, 1 January 2031, 8:00" And I log out And I log in as "student2" And I am on "Course 1" course homepage And I follow "Test lesson name" - And the activity date in "Test lesson name" should contain "Opens: Sunday, 1 January 2040, 8:00 AM" + And the activity date in "Test lesson name" should contain "Opens: Sunday, 1 January 2040, 8:00" And I log out And I log in as "student3" And I am on "Course 1" course homepage And I follow "Test lesson name" - And the activity date in "Test lesson name" should contain "Opens: Tuesday, 1 January 2030, 8:00 AM" + And the activity date in "Test lesson name" should contain "Opens: Tuesday, 1 January 2030, 8:00" Scenario: Override a group when teacher is in no group, and does not have accessallgroups permission, and the activity's group mode is 'separate groups' Given the following "permission overrides" exist: diff --git a/mod/lesson/tests/behat/lesson_user_override.feature b/mod/lesson/tests/behat/lesson_user_override.feature index 3b92b919802..d4d8273b53e 100644 --- a/mod/lesson/tests/behat/lesson_user_override.feature +++ b/mod/lesson/tests/behat/lesson_user_override.feature @@ -211,7 +211,7 @@ Feature: Lesson user override And I am on "Course 1" course homepage And I follow "Test lesson name" And I wait until the page is ready - Then the activity date in "Test lesson name" should contain "Closed: Saturday, 1 January 2000, 8:00 AM" + Then the activity date in "Test lesson name" should contain "Closed: Saturday, 1 January 2000, 8:00" And I should not see "Cat is an amphibian" And I log out And I log in as "student1" @@ -250,7 +250,7 @@ Feature: Lesson user override And I am on "Course 1" course homepage And I follow "Test lesson name" And I wait until the page is ready - Then the activity date in "Test lesson name" should contain "Opens: Tuesday, 1 January 2030, 8:00 AM" + Then the activity date in "Test lesson name" should contain "Opens: Tuesday, 1 January 2030, 8:00" And I should not see "Cat is an amphibian" And I log out And I log in as "student1"