-
- Downloads
[FIX] web: fix test failing non deterministically
The modified test failed non deterministically on runbot since [1]. The test simulates an action that throws an error in its setup, and assets that a dialog error is displayed. However, the thrown error was incomplete (no "data" key), and it crashed in the error handler, producing a second error, which was the one actually displayed when the test passed. We rely on the "unhandledrejection" event to handle errors, and an animation frame may occur between the moment the error is thrown and the moment the event is triggered. We fix this issue by actually fixing the root cause, which then avoids the problem: the thrown error is now complete and the handler doesn't crash anymore, so we are sure that the error dialog is in the DOM when we check, and it is the dialog for the error we thrown in the test, not for a crash in the code. [1] https://github.com/odoo/odoo/commit/38b689bbfc2b Runbot error~21956 closes odoo/odoo#125353 Signed-off-by:Samuel Degueldre (sad) <sad@odoo.com>
Loading
Please register or sign in to comment