summaryrefslogtreecommitdiff
path: root/doc/reference/testing.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/reference/testing.rst')
-rw-r--r--doc/reference/testing.rst19
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/reference/testing.rst b/doc/reference/testing.rst
index db447e0f41a..55c229fd041 100644
--- a/doc/reference/testing.rst
+++ b/doc/reference/testing.rst
@@ -307,13 +307,15 @@ Testing Infrastructure
Here is a high level overview of the most important parts of the testing
infrastructure:
-- there is an asset bundle named `web.js_tests_assets`_. This bundle contains
+- there is an asset bundle named `web.qunit_suite`_. This bundle contains
the main code (assets common + assets backend), some libraries, the QUnit test
- runner, and some additional helper code
+ runner and the test bundles listed below.
-- another asset bundle, `web.qunit_suite`_, contains all the tests (and the
- js_tests_assets code). Almost all the test files should be added to this
- bundle
+- a bundle named `web.tests_assets`_ includes most of the assets and utils required
+ by the test suite: custom QUnit asserts, test helpers, lazy loaded assets, etc.
+
+- another asset bundle, `web.qunit_suite_tests`_, contains all the test scripts.
+ This is typically where the test files are added to the suite.
- there is a `controller`_ in web, mapped to the route */web/tests*. This controller
simply renders the *web.qunit_suite* template.
@@ -380,7 +382,7 @@ the following:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
- <template id="qunit_suite" name="my addon tests" inherit_id="web.qunit_suite">
+ <template id="qunit_suite_tests" name="my addon tests" inherit_id="web.qunit_suite_tests">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/my_addon/static/tests/utils_tests.js"/>
</xpath>
@@ -526,8 +528,9 @@ Two new command line arguments were added since Odoo 13.0 to control this behavi
.. _qunit: https://qunitjs.com/
.. _qunit_config.js: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/static/tests/helpers/qunit_config.js#L49
-.. _web.js_tests_assets: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/views/webclient_templates.xml#L427
-.. _web.qunit_suite: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/views/webclient_templates.xml#L509
+.. _web.tests_assets: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/views/webclient_templates.xml#L594
+.. _web.qunit_suite: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/views/webclient_templates.xml#L660
+.. _web.qunit_suite_tests: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/views/webclient_templates.xml#L680
.. _controller: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/controllers/main.py#L637
.. _test_js.py: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/tests/test_js.py#L13
.. _test_utils.js: https://github.com/odoo/odoo/blob/51ee0c3cb59810449a60dae0b086b49b1ed6f946/addons/web/static/tests/helpers/test_utils.js