Commit Graph
28 Commits
Author SHA1 Message Date
Victor Feyens d2652e971a [IMP] doc: add information on the new populate feature.
* 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.

closes odoo/odoo#50596

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-13 15:47:04 +00:00
Julien Mougenot ed38c2adb8 [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>
2020-04-09 14:59:54 +00:00
Victor Feyens 0a3ca7df7a [FIX] doc: fix sphinx warnings
* Since 
https://github.com/odoo/odoo/commit/8d5da6e4be05428f3243f92c0464d3c1f6a43873#diff-e07cbcffb9fb7b2eafd1ace3c4b1626a, 
post_install and at_install test tags have been removed.

* minor warnings in javascript reference.

closes odoo/odoo#39817

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-05 15:17:42 +00:00
Christophe Monniez 8d5da6e4be [IMP] tests: log a warning when HttpCase test in at_install
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.

closes odoo/odoo#39462

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-30 12:35:23 +00:00
Christophe Simonis d67b2483e5 [MERGE] forward port branch saas-12.4 up to 9ed4872ea0
closes odoo/odoo#37372

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24 17:45:37 +00:00
Victor Feyens 87003e214e [DOC] batch of UI, Https, linter corrections 2019-09-18 08:52:34 +00:00
Christophe Monniez 0dc4a63e2d [IMP] tests: save screenshots and screencasts in temp
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.

closes odoo/odoo#34640

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-19 12:14:36 +00:00
Géry Debongnie 0e40d843d5 [DOC] doc: add warning in JS test documentation
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...

closes odoo/odoo#29021
2018-11-28 12:47:55 +00:00
Géry Debongnie 5a97faab5b [DOC] doc: add information on javascript testing
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.

closes odoo/odoo#28834
2018-11-20 12:51:09 +00:00
Christophe Monniez 23d840ddce [DOC] cmdline,testing: add documentation for test-tags
Closes #25789
2018-07-20 08:17:21 +02:00
Christophe Simonis 860dfb5586 [MERGE] forward port branch 11.0 up to d277adf4d5 2018-04-06 15:36:10 +02:00
Géry Debongnie ea6e7379a3 [DOC] doc: update/add documentation on js framework
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.
2018-03-30 14:11:49 +02:00
Christophe Simonis 56974322f8 [MERGE] forward port branch 11.0 up to 3b80a059ff 2018-01-12 19:03:00 +01:00
Christophe Simonis d76237e038 [MERGE] forward port branch 9.0 up to 26d3b77a1d 2018-01-12 15:32:15 +01:00
Martin Trigaux ea8cf1b7a2 [FIX] doc: escape code 2018-01-12 11:31:26 +01:00
Christophe Simonis 4eaef03df3 [MERGE] forward port branch 9.0 up to 330f84f211 2018-01-12 11:25:58 +01:00
Yenthe V.G ad78f115c3 [ADD] doc: warning about function names in tests
Closes #22116
2018-01-09 18:07:29 +01:00
Xavier Morel 346d770291 [FIX] sale_mrp: clear product routes before adding manufacturing ones
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.
2017-12-04 13:11:56 +01:00
Xavier Morel d59abc4c74 [ADD] doc: Form & proxies 2017-12-04 13:11:55 +01:00
Christophe Simonis e245135421 [MERGE] forward port branch 9.0 up to d53a201987 2017-09-21 13:55:52 +02:00
Christophe Simonis d53a201987 [MERGE] forward port branch saas-6 up to 43a47dbc93 2017-09-21 13:51:19 +02:00
Jairo Llopis 35441cfd62 [IMP] doc: add test classes documentation
Closes #13902
2017-09-19 17:00:59 +02:00
Martin Trigaux e81f186ff8 [FIX] doc: change references to odoo.py to odoo-bin 2016-10-12 12:36:45 +02:00
Martin Trigaux 9528024536 [FIX] doc: building correctly autoclass references 2016-10-11 12:09:27 +02:00
Leonardo Rochael Almeida 06b3026bcd [IMP] unittest2 > unittest
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
2015-09-28 10:37:27 +02:00
Xavier Morel 95e56a109d [ADD] doc: new theme
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
2015-07-07 11:22:50 +02:00
Xavier Morel 9808ca3e31 [IMP] test discovery, documentation, deprecation warnings
* 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
2015-01-15 13:28:25 +01:00
Xavier Morel bc59cfce61 [IMP] doc: add testing reference and improve docstrings 2014-10-09 15:38:36 +02:00