Commit Graph
15 Commits
Author SHA1 Message Date
Géry Debongnie 3915a3f00e [FIX] web: display better tracebacks in debug=assets
A previous commit (934e0896160272542dd00) modified QUnit to make sure we
can display better tracebacks in debug=assets mode.  However, this
commit did not apply to errors coming from failing promises.

To fix this, we can simply keep a reference to the error in that
specific case.

closes odoo/odoo#67048

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-02 11:00:30 +00:00
Géry Debongnie cbadef9365 [IMP] web: display annotated tracebacks in debug=assets
Warning: this commit savagely patches qunitjs sourcecode. I know... I
feel bad.

Since we updated the way debug=assets work, we have a new problem in the
qunit test suite: the tracebacks displayed by QUnit are relative to the
bundle file, not the original file, which is annoying in practice.

There is really no good way that I could find to integrate with QUnit to
perform that task, so I had to do it the ugly way: modify QUnit from the
inside to use the StackTrace library to annotate the traceback with the
proper information.

closes odoo/odoo#66771

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-25 14:45:15 +00:00
Aaron Bohy c4bddd6ba2 [IMP] web: qunit: always log name of failing test
After each test, a check is done that there is no leftover in the
DOM. If there are, the suite fails, but there is no indication on
the test that left elements in the DOM.

This commit logs that missing information. We also stop dumping
the DOM when this happens, as it was rather creating noise than
providing useful information (the remaining elements are still
logged though).

closes odoo/odoo#58806

X-original-commit: 598d036b59012af0a95894d759fe3b6276fc8ccb
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-09-29 12:03:40 +00:00
29726e8fd0 [ADD] web: add owl 1.0.0-beta1 to odoo
With this commit, we properly introduce the Owl library into our beloved
codebase. More information on the Owl library can be found in the project
repository: https://github.com/odoo/owl/

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2019-12-09 11:09:10 +00:00
Aaron Bohy ef88b8e408 [IMP] web: qunit: add hook at end of each test
This hook will be used to check that there are no leftovers in the
DOM.
2019-03-06 19:53:21 +01:00
David Monjoie aa24779cfa [REF] web: update qunit to v2.9.1
The new version of qunit better reports failures of promises then
the previous version.
2019-03-06 19:49:01 +01:00
Alexandre Kühn 7113e27cb6 [FIX] web: update to qunit from 2.2.1 to 2.3.0
In particular, qunit 2.3.0 solves this issue: https://github.com/qunitjs/qunit/issues/1119

A consequence of the above issue is that some tests could have completed successfully,
although an error was raised.
2018-02-22 14:23:03 +01:00
Géry Debongnie 6a8e7acc67 [IMP] web: update qunit to last version (2.2.1)
It has an Abort button!!!
2017-04-11 19:44:38 +02:00
Géry Debongnie 905e01921f [REF] web, *: redesign all JS views
This commit introduce a full redesign of all JS views.  We started
basically from scratch.  The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.

Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented

We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.

Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2017-04-11 19:44:38 +02:00
Géry Debongnie 7165ac08aa [IMP] web: update qunit to last version (1.17)
The testing framework was done with an old version of qunit.  We had to
program our layer on top of it to provide support for promises in tests.
The last version of qunit now supports promises, and the testing
framework needs to be reworked anyway with the new modules.
2015-03-18 09:01:50 +01:00
Xavier Morel cdee92f984 [IMP] update QUnit to 1.12.0 (doesn't fix issue, adds features)
bzr revid: xmo@openerp.com-20130801091239-6lz0ya595i226l85
2013-08-01 11:12:39 +02:00
Xavier Morel 910097617b [IMP] update qunit to 1.9.0
bzr revid: xmo@openerp.com-20120905151840-dopnvm12n0q67wue
2012-09-05 17:18:40 +02:00
Xavier Morel 910f217da1 [IMP] update qunit to 1.3
bzr revid: xmo@openerp.com-20120227094132-dk41nad2mx854s4p
2012-02-27 10:41:32 +01:00
Xavier Morel ed665ec44e [IMP] update qunit to 1.2
bzr revid: xmo@openerp.com-20111125090145-3plxy4tr1l2nm3ne
2011-11-25 10:01:45 +01:00
Antony Lesuisse bedfc48dcf rename base into web part1
bzr revid: al@openerp.com-20110905110309-egx167t1ni1fzho1
2011-09-05 13:03:09 +02:00