You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(#1701): Events page displays year for events scheduled to start or end at a future year (#2500)
* Add Methods To Check If Event Starts And Ends This Year
* Set Up Templates For Querying Start And End Years
Passed variables to the time_tag template [time_tag.html] that checks if an event was scheduled to start or end with the current year.
* Insert New Test Data And Update test_views.py
More events are created to test particular scenarios of events especially events set to start or end at a future year.
* Time Tag Now Shows Year For Events With Details Not Within The Current Year
The time tag now displays the year when an event will occur. This is only for events that have been scheduled to start or end in at a future year. The accompanying functional tests have also been included.
* Move All Test Data To Functional Test
All test data concerning the provision of data to serve the functional tests have been moved to the functional test.
As it improves readability.
All other test data at test_views.py was reset
to accommodate for the reduction in number of test data instances.
* Functional Test For Displaying Year Of Event For Future Events Now Implemented With Unit Tests
* Remove Functional Test For Displaying Year Of Future Event
Since the current CI at the main branch does not support selenium [web driver] operations, the functional test which depends on selenium to run has been removed.
* Handle Case When Call To Next Event Returns None
* Fix Erroneous Addition To Dev Requirements
This error was introduced in 115af08
* Refactor Tests For Relevant Year String Rendering At Events Page
- Updated the test methods `test_scheduled_to_start_this_year_method` and `test_scheduled_to_end_this_year_method` to better reflect event scheduling edge cases.
- Added assertions to verify when events are not scheduled to start or end within the current year.
- Utilize `unittest.mock` to clamp down datetime-sensitive tests.
---------
Co-authored-by: Jacob Coffee <jacob@z7x.org>
0 commit comments