Skip to content

Issue #1701: Calendar events now shows the year for events which are not in the current year #1713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from

Conversation

alvindera97
Copy link
Contributor

Any calendar event that is dated beyond the current year now displays the year at which it has been scheduled. This happens for both start date and end date.

I must say that I encountered serious difficulty with Django's LiveServerTestCase and at the end, I decided to just merge the 2 functional test method into one. Django's LiveServerTestCase for some reason cannot run multiple test methods [belonging to the same test class] at a stretch. This is because at the end of executing each test method, django sort of resets the data base leading to a lot of integrity errors and confusing test results.

Please feel free to ask me any questions. This is my first time contributing to the open source community.
Thanks in anticipated reply.

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.
Selenium is used for running functional tests on the rendering of the events page. In the absence of a physical browser, the test will be done 'headless'.
More events are created to test particular scenarios of events especially events set to start or end at a future year.
…t 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.
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.
@alvindera97
Copy link
Contributor Author

On my local machine here, where I have selenium installed pip install selenium, all my tests work perfectly fine. However, I can see that the CI has spotted a failure in one of the tests that I wrote — directly related to selenium. I really don't know any other way to go about this.

I am not aware if I can even attempt to change the configurations so that the chance to bring in functional testing. At least I would have set up a sequence for the CI to install selenium and add the required downloaded driver to the computer's path.

@alvindera97
Copy link
Contributor Author

I will now be submitting another PR with changes made to the tests so that they do not require selenium to run.

I will be basically replicating test concerns from the functional tests to unit tests [which don't require selenium to run]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant