Skip to content

Commit c65644f

Browse files
committed
[FIX] mail: fix tour finished dirty form view (composer_autosave)
Before this commit, tour "test_mail_composer_autosave_tour" could fail at end with the following error: ``` Tour finished with a dirty form view being open. Dirty form views are automatically saved when the page is closed, which leads to stray network requests and inconsistencies. ``` This happens because test creates a new record and posts a message in full composer. It checks that message is present in chatter and then leave the form view. When posting the message, the form view is saved, but this can happen with a small delay after message is visible on chatter like after tour has ended. This commit fixes the issue by awaiting form view is saved, so that tour doesn't panic at end there's a form view with unsaved changes, as the form view is properly saved with sending a message. Fixes runbot error 198583 Fixes runbot error 222676 closes odoo#218258 X-original-commit: 75ef862 Signed-off-by: Sébastien Theys (seb) <[email protected]>
1 parent 0e13298 commit c65644f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

addons/mail/static/tests/tours/mail_composer_autosave_tour.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ registry.category("web_tour.tours").add("mail/static/tests/tours/mail_composer_a
3636
content: "Check message is shown",
3737
trigger: '.o-mail-Message-body:contains("Hello")',
3838
},
39+
{
40+
trigger: ".o_form_saved",
41+
},
3942
...stepUtils.toggleHomeMenu(),
4043
],
4144
});

0 commit comments

Comments
 (0)