* Cmdline interface: how to trigger database population
* Testing: how to implement database population on a given model.
* autodocumentation of the population methods
+ improve population methods docstrings.
closesodoo/odoo#50596
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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.
closesodoo/odoo#49306
Related: odoo/enterprise#9797
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When loading a page on an existing starting database, registry is not
fully loaded causing potential error when trying to access model
existing in database (views, menitem, ...) since model added in last
loaded module does not exist in registry.
Thus, executing browser js test may lead to errors when executed during
an update on a database with other modules installed.
HTTPCase should be executed post_install to ensure that registry is
fully loaded to avoid this problem.
Since HTTPCase are slower than other test, it is also a good idea to
execute them at the end, in order to prioritize fast fail.
With this commit, a warning is isued if such a test class is tagged to
run at install time.
While at it, remove deprecated at_install and post_install helpers and
remove the deprecated phantom_js alias.
closesodoo/odoo#39462
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Actually, when a browser_js test is running, screencasts and screenshots
are saved only if a "--logfile" parameter is specified.
This is problematic with the runbot because '--logfile' arg is not
provided when running tests. Also, in most situations, developpers
prefer to have logs on stdout.
With this commit, two CLI args are added to specify screencasts and
screenshots directories. If no screenshots dir is provided, it defaults
to "{tmp_dir}/odoo_tests/{db_name}/screenshots".
It means that screenshots are always enabled during browser_js tests.
If screencasts arg is given, it enables screencasts and save them in
"DIR/{db_name}/screencasts". If the screencasts parameter is "1", DIR
will be the same as for screenshots.
The ffmpeg tools is used to encode frames into a video. If the ffmpeg
tool is not found on the system, the frames are kept as pngs files
instead.
closesodoo/odoo#34640
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
This commit adds a warning for common causes of mistakes, while running
the JS test suite. It is possible to lose a lot of time trying to make the
tests pass if one does not notice that the browser window is not zoomed at 100%.
Maybe this warning will help someone in the future...
closesodoo/odoo#29021
The documentation on JS testing was almost completely useless. With the
introduction of our new test utility functions, it is time to document
properly how the testing system works.
closesodoo/odoo#28834
The state of the JS documentation was quite sad, not updated in a long
time. With this commit, we rework a lot of the JS doc. Most notably,
we add a section 'Javascript Cheatsheet' (help on some common
customization tasks) and rewrite the 'Javascript Reference' totally.
Note that the JS reference page also contains a reference on all field
widgets.
This work is just the beginning, it is probably not complete, but at
least we will have a foundation.
If purchase happens to be installed before MRP is, the "buy" route is
set by default on products *and* takes precedence over the MRP
one (because created first and same sequence).
This leads to purchase trying to buy products (which have no seller)
instead of MRP trying to manufacture them, which is what we're trying
to do & test.
Fix by clearing the route_ids field before adding the MRP routes.
The `unittest2` package is simply a backport of `unittest` from the
Standard Library of Python 2.7 to previous versions.
There is no reason to use it any longer.
Closes#6941
Pretty much completely rewritten theme with custom HTML translator and a
few parts of the old theme extracted to their own extensions.
Banner images thought not to be that huge after all, and not worth the
hassle of them living in a different repository.
co-authored with @stefanorigano
* document and warn that checks and fast_suite in tests sub-packages are
deprecated and have no effect
* avoid iterating all currently loaded modules when looking for test
modules in a tests sub-package
* replace use of __import__ by importlib
Fixes#3152