Skip to content
Snippets Groups Projects
Commit 89749f07 authored by Aaron Bohy's avatar Aaron Bohy
Browse files

[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: default avatarSamuel Degueldre (sad) <sad@odoo.com>
parent d4d46b22
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment