Skip to content
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

[#976] Implemented first Playwright tests for action status toggle #404

Merged
merged 9 commits into from
Dec 23, 2022
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
sudo apt-get update
sudo apt-get install -y libxml2-dev libxmlsec1-dev libxmlsec1-openssl
pip install -r requirements/dev.txt codecov
playwright install

- name: Build frontend
run: |
npm ci
Expand Down
20 changes: 15 additions & 5 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,34 +72,44 @@ development machine.
$ source env/bin/activate
$ pip install -r requirements/dev.txt

4. Install and build the frontend libraries:
4. Run third-party install commands:

- Install the required browsers for `Playwright`_ end-to-end testing.

.. code-block:: bash

$ playwright install

.. _Playwright: https://playwright.dev/python/

5. Install and build the frontend libraries:

.. code-block:: bash

$ npm install
$ npm run build

5. Create the statics and database:
6. Create the statics and database:

.. code-block:: bash

$ python src/manage.py collectstatic --link
$ python src/manage.py migrate

6. Create a superuser to access the management interface:
7. Create a superuser to access the management interface:

.. code-block:: bash

$ python src/manage.py createsuperuser

7. You can now run your installation and point your browser to the address
8. You can now run your installation and point your browser to the address
given by this command:

.. code-block:: bash

$ python src/manage.py runserver

8. Create a .env file with database settings. See dotenv.example for an example.
9. Create a .env file with database settings. See dotenv.example for an example.

$ cp dotenv.example .env

Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ django-csp-reports
mozilla-django-oidc-db
django-open-forms-client
django-htmx
playwright

# API libraries
djangorestframework
Expand Down
8 changes: 8 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ glom==20.11.0
# via
# -r requirements/base.in
# mozilla-django-oidc-db
greenlet==2.0.1
# via playwright
html5lib==1.1
# via weasyprint
humanfriendly==10.0
Expand Down Expand Up @@ -286,6 +288,8 @@ pillow==9.0.1
# -r requirements/base.in
# easy-thumbnails
# weasyprint
playwright==1.28.0
# via -r requirements/base.in
polib==1.1.1
# via django-rosetta
psycopg2==2.9.1
Expand All @@ -294,6 +298,8 @@ pycparser==2.20
# via cffi
pydyf==0.1.2
# via weasyprint
pyee==9.0.4
# via playwright
pygments==2.12.0
# via rich
pyjwt==2.3.0
Expand Down Expand Up @@ -374,6 +380,8 @@ tinycss2==1.1.1
# via
# cssselect2
# weasyprint
typing-extensions==4.4.0
# via pyee
unidecode==1.1.2
# via django-filer
uritemplate==4.1.1
Expand Down
55 changes: 19 additions & 36 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,12 @@ asgiref==3.4.1
# django
astroid==2.8.0
# via pylint
async-generator==1.10
# via
# trio
# trio-websocket
attrs==21.2.0
# via
# -c requirements/base.txt
# -r requirements/base.txt
# glom
# jsonschema
# outcome
# trio
beautifulsoup4==4.10.0
# via
# -c requirements/base.txt
Expand All @@ -47,7 +41,6 @@ certifi==2022.9.24
# elastic-apm
# elasticsearch
# requests
# selenium
# sentry-sdk
cffi==1.15.0
# via
Expand Down Expand Up @@ -128,7 +121,6 @@ django==3.2.15
# django-relativedelta
# django-rich
# django-rosetta
# django-selenium-login
# django-sendfile2
# django-simple-certmanager
# django-sniplates
Expand Down Expand Up @@ -301,8 +293,6 @@ django-rosetta==0.9.7
# via
# -c requirements/base.txt
# -r requirements/base.txt
django-selenium-login==2.0.0
# via -r requirements/test-tools.in
django-sendfile2==0.7.0
# via
# -c requirements/base.txt
Expand Down Expand Up @@ -381,8 +371,6 @@ et-xmlfile==1.1.0
# -c requirements/base.txt
# -r requirements/base.txt
# openpyxl
exceptiongroup==1.0.4
# via trio
face==20.1.1
# via
# -c requirements/base.txt
Expand Down Expand Up @@ -431,8 +419,11 @@ glom==20.11.0
# -c requirements/base.txt
# -r requirements/base.txt
# mozilla-django-oidc-db
h11==0.14.0
# via wsproto
greenlet==2.0.1
# via
# -c requirements/base.txt
# -r requirements/base.txt
# playwright
html5lib==1.1
# via
# -c requirements/base.txt
Expand All @@ -447,7 +438,6 @@ idna==3.2
# -c requirements/base.txt
# -r requirements/base.txt
# requests
# trio
importlib-metadata==4.8.2
# via
# -c requirements/base.txt
Expand Down Expand Up @@ -532,8 +522,6 @@ orderedmultidict==1.0.1
# -c requirements/base.txt
# -r requirements/base.txt
# furl
outcome==1.2.0
# via trio
pep8==1.7.1
# via -r requirements/test-tools.in
phonenumbers==8.12.33
Expand All @@ -548,6 +536,10 @@ pillow==9.0.1
# weasyprint
platformdirs==2.4.0
# via pylint
playwright==1.28.0
# via
# -c requirements/base.txt
# -r requirements/base.txt
polib==1.1.1
# via
# -c requirements/base.txt
Expand All @@ -567,6 +559,11 @@ pydyf==0.1.2
# -c requirements/base.txt
# -r requirements/base.txt
# weasyprint
pyee==9.0.4
# via
# -c requirements/base.txt
# -r requirements/base.txt
# playwright
pygments==2.12.0
# via
# -c requirements/base.txt
Expand Down Expand Up @@ -600,8 +597,6 @@ pyrsistent==0.18.0
# -c requirements/base.txt
# -r requirements/base.txt
# jsonschema
pysocks==1.7.1
# via urllib3
python-dateutil==2.8.2
# via
# -c requirements/base.txt
Expand Down Expand Up @@ -671,8 +666,6 @@ rich==12.4.1
# -c requirements/base.txt
# -r requirements/base.txt
# django-rich
selenium==4.6.0
# via -r requirements/test-tools.in
sentry-sdk==1.4.3
# via
# -c requirements/base.txt
Expand All @@ -691,10 +684,6 @@ six==1.16.0
# python-dateutil
# qrcode
# requests-mock
sniffio==1.3.0
# via trio
sortedcontainers==2.4.0
# via trio
soupsieve==2.3.1
# via
# -c requirements/base.txt
Expand Down Expand Up @@ -725,15 +714,12 @@ tinycss2==1.1.1
# weasyprint
toml==0.10.2
# via pylint
trio==0.22.0
# via
# selenium
# trio-websocket
trio-websocket==0.9.2
# via selenium
typing-extensions==3.10.0.2
typing-extensions==4.4.0
# via
# -c requirements/base.txt
# -r requirements/base.txt
# astroid
# pyee
# pylint
unidecode==1.1.2
# via
Expand All @@ -745,14 +731,13 @@ uritemplate==4.1.1
# -c requirements/base.txt
# -r requirements/base.txt
# drf-spectacular
urllib3[socks]==1.26.7
urllib3==1.26.7
# via
# -c requirements/base.txt
# -r requirements/base.txt
# elastic-apm
# elasticsearch
# requests
# selenium
# sentry-sdk
uwsgi==2.0.19.1
# via
Expand All @@ -777,8 +762,6 @@ webtest==3.0.0
# via django-webtest
wrapt==1.12.1
# via astroid
wsproto==1.2.0
# via trio-websocket
xlrd==2.0.1
# via
# -c requirements/base.txt
Expand Down
Loading