-
- Downloads
[IMP] tests: replace browser_js success and failure strings
When evaluating js tests using the browser_js method, they are considered a success when 'ok' is found in the console log and a failure if 'error' is found instead. This is not very robust and recently failed with this commit : 7410de11 It adds a filter named 'Error' in a view, when the 'click_all' test clicks on this filter, a message with the name of the filter is written in the console, wrongly leading to a test failure. With this commit, the browser_js method expects a log message in the browser console with the explicit text "test successful". On the other hand, any error in the console log will lead to a test failure but a test can be forced to fail with the explicit error message in the browser console "test failed". As a bonus, the python logger should now also log browser js trace messages. closes odoo/odoo#31158
Showing
- addons/web/static/src/js/tools/test_menus.js 2 additions, 2 deletionsaddons/web/static/src/js/tools/test_menus.js
- addons/web/static/tests/helpers/qunit_config.js 2 additions, 2 deletionsaddons/web/static/tests/helpers/qunit_config.js
- addons/web_tour/static/src/js/tour_manager.js 2 additions, 2 deletionsaddons/web_tour/static/src/js/tour_manager.js
- addons/website/tests/test_ui.py 1 addition, 1 deletionaddons/website/tests/test_ui.py
- odoo/addons/test_assetsbundle/tests/test_assetsbundle.py 2 additions, 2 deletionsodoo/addons/test_assetsbundle/tests/test_assetsbundle.py
- odoo/tests/common.py 7 additions, 14 deletionsodoo/tests/common.py
Loading
Please register or sign in to comment