From 75fa986b2fbba251491c4dbd54ba287f52a819be Mon Sep 17 00:00:00 2001 From: David Watson <14983002+watson8@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:17:44 +0000 Subject: [PATCH] CTP-3973 behat date picker --- tests/behat/behat_mod_coursework.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/behat/behat_mod_coursework.php b/tests/behat/behat_mod_coursework.php index 2ec55dd..1574968 100644 --- a/tests/behat/behat_mod_coursework.php +++ b/tests/behat/behat_mod_coursework.php @@ -1136,7 +1136,7 @@ public function there_is_an_extension_for_the_student_which_has_expired() { */ public function i_enter_an_extension_in_the_form(string $timeextension, string $reasoncode = '') { $newtime = strtotime('3:30pm', strtotime($timeextension)); - // Put into ISO08601 format. + // Put into ISO-8601 format. $newtimestring = date('Y-m-d\TH:i', $newtime); $script = "const e = document.querySelector('input#extension-extend-deadline');" . "e.value = '$newtimestring'; e.dispatchEvent(new Event('change'));"; @@ -1160,8 +1160,8 @@ public function i_enter_an_extension_in_the_form(string $timeextension, string $ */ public function i_should_see_the_extension_in_the_form(string $timeextension, string $reasoncode = '') { $newtime = strtotime('3:30pm', strtotime($timeextension)); - // Put into format 30-09-2024 15:47. - $newtimestring = date('d-m-Y H:i', $newtime); + // Put into ISO-8601 format. + $newtimestring = date('Y-m-d\TH:i', $newtime); $script = "document.querySelector('input#extension-extend-deadline').value"; $result = behat_base::evaluate_script_in_session($this->getSession(), $script); if ($result != $newtimestring) {