From 7a657845823a52193c532282f8c3d017037213b3 Mon Sep 17 00:00:00 2001 From: Brandon Rodriguez <brodriguez8774@gmail.com> Date: Thu, 14 Sep 2023 16:06:06 -0400 Subject: [PATCH] Update documentation --- docs/source/configuration/general.rst | 7 ++-- docs/source/quickstart.rst | 34 ++++++++++++++++++- docs/source/roadmap.rst | 4 +-- .../test_cases/live_server_test_case.rst | 9 ++--- 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/docs/source/configuration/general.rst b/docs/source/configuration/general.rst index fc87bac..985ca94 100644 --- a/docs/source/configuration/general.rst +++ b/docs/source/configuration/general.rst @@ -64,11 +64,10 @@ Example:: SELENIUM_TEST_BROWSER ===================== -When using the :doc:`../test_cases/live_server_test_case` class for -`Selenium <https://www.selenium.dev/>`_ tests, this setting specify which browser -type you wish to use. +When using the :doc:`../test_cases/live_server_test_case` classes +for `Selenium <https://www.selenium.dev/>`_ tests, this setting specifies which browser to use. -Supported test browsers are as follows: +Currently, supported test browsers are as follows: * chrome * chromium * firefox diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index b5719be..fa6af77 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -32,14 +32,46 @@ definition: 'django.contrib.sessions', ) +Optional Packages +----------------- -Finally, for colorized debug output, also install the ``colorama`` package. +Django ETC comes with support for the following optional packages. + + +For colorized debug output, install the ``colorama`` package. .. code:: python pip install colorama +For basic `selenium <https://www.selenium.dev/>`_ support, install the ``selenium`` and ``webdriver-manager`` packages. + +.. code:: python + + pip install selenium webdriver-manager + +.. note:: + + As of Chrome version 115 and higher, the official chromedriver API has been modified, and the traditional release + repository is no longer supported. Chromedriver releases can now only be discovered programmatically. To support + that, ``selenium`` package version 4.11.2 or higher is now required. + + See https://bonigarcia.dev/webdrivermanager/#support-for-chromedriver-115 and + https://chromedriver.chromium.org/downloads/version-selection for more information. + + +For full `Django Channels <https://github.com/django/channels>`_ selenium support, install the `channels` and `daphne` +packages. + +.. code:: python + + pip install channels daphne + +Or alternatively see the +`official channels installation guide <https://channels.readthedocs.io/en/latest/installation.html>`_ for additional +methods. + Testing Environments ==================== diff --git a/docs/source/roadmap.rst b/docs/source/roadmap.rst index 5364606..f153920 100644 --- a/docs/source/roadmap.rst +++ b/docs/source/roadmap.rst @@ -14,7 +14,7 @@ Below is the minimum viable state for each version release. * At least some documentation exists for BaseTestCase and IntegrationTestCase. -* v 0.5.x +* v 0.6.x * Project is in a viable state to test both basic responses and selenium browser responses. @@ -27,7 +27,7 @@ Below is the minimum viable state for each version release. if not complete. * At least some documentation exists for LiveServerTestCase. -* v 0.6.x +* v 0.7.x * Project is in a viable state to test basic responses, selenium browser responses, and CSV file downloads. diff --git a/docs/source/test_cases/live_server_test_case.rst b/docs/source/test_cases/live_server_test_case.rst index 62a616b..92c4abc 100644 --- a/docs/source/test_cases/live_server_test_case.rst +++ b/docs/source/test_cases/live_server_test_case.rst @@ -2,12 +2,13 @@ LiveServerTestCase ****************** -The **LiveServerTestCase** class provides additional wrapper functionality for -writing tests that directly check a browser window instance, such as +The **LiveServerTestCase** and **ChannelsLiveServerTestCase** classes provide +additional wrapper functionality for writing tests that directly check a +browser window instance, such as when using `Selenium <https://www.selenium.dev/documentation/>`_. -This class can be very helpful in testing logic that requires live browser +These classes can be very helpful in testing logic that requires live browser manipulation, such as any logic that uses JavaScript to function. @@ -23,6 +24,6 @@ manipulation, such as any logic that uses JavaScript to function. .. attention:: - This TestCase is not yet implemented. + This TestCase is not yet fully implemented. See :doc:`../roadmap`. -- GitLab