From a299b1c1db353abf8323e63015f12217957b14ef Mon Sep 17 00:00:00 2001 From: Asma Jamil Date: Tue, 17 Oct 2023 10:24:57 +0300 Subject: [PATCH] Change dates in test_data.json and teacher_list_test.py files Selenium tests are failing because the dates in the test have passed. The course is supposed to be open in order to run the tests successfully so future dates need to be set in test data JSON and teacher_list_test.py files --- selenium_test/test/teacher_list_test.py | 12 ++++++------ selenium_test/test_data.json | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/selenium_test/test/teacher_list_test.py b/selenium_test/test/teacher_list_test.py index 27cc43e42..2dab23669 100644 --- a/selenium_test/test/teacher_list_test.py +++ b/selenium_test/test/teacher_list_test.py @@ -66,14 +66,14 @@ def testTableHasCorrectData(self) -> None: '', 'aplus-001 My test course: A+ Test Course Instance', '2020-09-27 09:00:00+00:00', - '2023-09-27 09:00:00+00:00' + '2030-09-27 09:00:00+00:00' ], [ 'Teacher User', '', 'aplus-001 My test course: Hook Example', '2020-09-27 09:00:00+00:00', - '2023-09-27 09:00:00+00:00' + '2030-09-27 09:00:00+00:00' ], ] list_data_with_assistants = [ @@ -82,25 +82,25 @@ def testTableHasCorrectData(self) -> None: '', 'aplus-001 My test course: A+ Test Course Instance', '2020-09-27 09:00:00+00:00', - '2023-09-27 09:00:00+00:00' + '2030-09-27 09:00:00+00:00' ], [ 'Assistant User', '', 'aplus-001 My test course: A+ Test Course Instance', '2020-09-27 09:00:00+00:00', - '2023-09-27 09:00:00+00:00' + '2030-09-27 09:00:00+00:00' ], [ 'Teacher User', '', 'aplus-001 My test course: Hook Example', '2020-09-27 09:00:00+00:00', - '2023-09-27 09:00:00+00:00' + '2030-09-27 09:00:00+00:00' ], ] - ending_time = date.fromisoformat("2023-09-27") + ending_time = date.fromisoformat("2030-09-27") starting_time = date.fromisoformat("2020-09-27") early = starting_time - timedelta(days=1) diff --git a/selenium_test/test_data.json b/selenium_test/test_data.json index 6425a18b0..bdcf9840c 100644 --- a/selenium_test/test_data.json +++ b/selenium_test/test_data.json @@ -51,7 +51,7 @@ { "fields": { "head_urls": "", - "ending_time": "2023-09-27T09:00:00Z", + "ending_time": "2030-09-27T09:00:00Z", "visible_to_students": true, "configure_url": "", "description": "", @@ -77,7 +77,7 @@ { "fields": { "head_urls": "", - "ending_time": "2023-09-27T09:00:00Z", + "ending_time": "2030-09-27T09:00:00Z", "visible_to_students": true, "configure_url": "", "description": "", @@ -108,7 +108,7 @@ "name": "First Exercise Round", "course_instance": 1, "late_submissions_allowed": false, - "closing_time": "2023-09-27T09:00:00Z", + "closing_time": "2030-09-27T09:00:00Z", "late_submission_deadline": "2024-09-27T09:00:00Z", "introduction": "", "opening_time": "2020-09-27T09:00:00Z", @@ -126,7 +126,7 @@ "name": "Exercises with Hook", "course_instance": 2, "late_submissions_allowed": false, - "closing_time": "2023-09-27T09:00:00Z", + "closing_time": "2030-09-27T09:00:00Z", "late_submission_deadline": "2024-09-27T09:00:00Z", "introduction": "", "opening_time": "2020-09-27T09:00:00Z",