[IMP] web_editor: re-run tests with mobile version
Some tests use methods that have two different implementations (one for
desktop and one for mobile). So far, the only example is deleteBackward
and its mobile counterpart deleteBackwardMobile.
This commit introduces a mechanism in the web_editor tests to avoid
duplicating such tests. When a test calls a method that has two
implementations, it uses the desktop one by default and a flag is set
that indicates the test should be re-run with its mobile implementation
next.
When errors are raised while the mobile version is in use, we prefix
their message with '[MOBILE VERSION]' to ease debugging.
Note that this mechanism relies on proper flag management by the
aforementioned methods.
Task-3054808
closes odoo/odoo#121977
X-original-commit: 712382c6ae200037c58a6677069c5f2ae783ccec
Signed-off-by:
David Monjoie (dmo) <dmo@odoo.com>
Showing
- addons/web_editor/static/src/js/editor/odoo-editor/test/spec/link.test.js 1 addition, 34 deletions...r/static/src/js/editor/odoo-editor/test/spec/link.test.js
- addons/web_editor/static/src/js/editor/odoo-editor/test/utils.js 37 additions, 20 deletions...web_editor/static/src/js/editor/odoo-editor/test/utils.js
Loading
Please register or sign in to comment