A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Add frontend tests to docs
Michael Shamoon70bc70ec97d0
diff --git a/docs/extending.rst b/docs/extending.rstindex a9e6ebf94..ae855e370 100644--- a/docs/extending.rst+++ b/docs/extending.rst@@ -34,6 +34,8 @@ it fixed for everyone!Before contributing please review our `code of conduct`_ and other importantinformation in the `contributing guidelines`_.+.. _code-formatting-with-pre-commit-hooks:+Code formatting with pre-commit Hooks=====================================@@ -183,6 +185,31 @@ X-Frame-Options are in place so that the front end behaves exactly as in productrelies on you being logged into the back end. Without a valid session, The front end will simplynot work.+Testing and code style:++* The frontend code (.ts, .html, .scss) use ``prettier`` for code formatting via the Git+ ``pre-commit`` hooks which run automatically on commit. See+ :ref:`above <code-formatting-with-pre-commit-hooks>` for installation. You can also run this+ via cli with a command such as++ .. code:: shell-session++ $ git ls-files -- '*.ts' | xargs pre-commit run prettier --files++* Frontend testing uses jest and cypress. There is currently a need for significantly more+ frontend tests. Unit tests and e2e tests, respectively, can be run non-interactively with:++ .. code:: shell-session++ $ ng test+ $ npm run e2e:ci++ Cypress also includes a UI which can be run from within the ``src-ui`` directory with++ .. code:: shell-session++ $ ./node_modules/.bin/cypress open+In order to build the front end and serve it as part of django, execute.. code:: shell-session