[FIX] web: tests: click helper: throw error if target is disabled
This commit is a backport of odoo/odoo@f065276a4611ddad67fd3d200fc131f2e30907b5 Before chrome 116, programmatic clicks on disabled buttons weren't actually fired. With chrome 116, they are. As a consequence, some tests fails on chrome 116 because they click (on purpose) on disabled button to highlight the fact that nothing happens. This commit improves the click helper to make it throw an error when the target is disabled. It also adapts the tests that were clicking on disabled button, in general to simply assert that the button is disabled instead. closes odoo/odoo#137901 Related: odoo/enterprise#48559 Signed-off-by:Romeo Fragomeli (rfr) <rfr@odoo.com> Co-authored-by:
Aaron Bohy <aab@odoo.com>
Showing
- addons/web/static/tests/components/pager_tests.js 3 additions, 3 deletionsaddons/web/static/tests/components/pager_tests.js
- addons/web/static/tests/fields/relational_fields/field_many2one_tests.js 1 addition, 2 deletions...ic/tests/fields/relational_fields/field_many2one_tests.js
- addons/web/static/tests/fields/relational_fields/field_one2many_tests.js 0 additions, 1 deletion...ic/tests/fields/relational_fields/field_one2many_tests.js
- addons/web/static/tests/helpers/test_utils_dom.js 3 additions, 0 deletionsaddons/web/static/tests/helpers/test_utils_dom.js
- addons/web/static/tests/views/form_tests.js 2 additions, 2 deletionsaddons/web/static/tests/views/form_tests.js
- addons/web/static/tests/views/list_tests.js 3 additions, 3 deletionsaddons/web/static/tests/views/list_tests.js
Loading
Please register or sign in to comment