summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJulien Mougenot <jum@odoo.com>2020-04-09 12:50:23 +0000
committerJulien Mougenot <jum@odoo.com>2020-04-09 14:59:54 +0000
commited38c2adb85a7cb62fda4c2db21a3cad9d84a420 (patch)
tree786ddd5a4b87dbc21e0ae9ac42ec2868c793e2dd /doc
parent26570b0701cf2d184b6f36bdd8885587f7939c9d (diff)
[FIX] web: flatten t-call-assets in test assets bundle
Before this commit, the test assets were called with a `t-call-assets` and contained themselves some other `t-call-assets` to the back-end assets. According to the current specification, having nested `t-call-assets` will result in a compilation of the lower levels regardless of the current debugging mode. Now, the test bundles (desktop & mobile) have been arranged so that their `t-call-assets` are all called on the same level. closes odoo/odoo#49306 Related: odoo/enterprise#9797 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'doc')
-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