diff --git a/addons/website_livechat/static/tests/tours/website_livechat_chatbot_flow.js b/addons/website_livechat/static/tests/tours/website_livechat_chatbot_flow.js index c794711e3c7..3c0a3daf648 100644 --- a/addons/website_livechat/static/tests/tours/website_livechat_chatbot_flow.js +++ b/addons/website_livechat/static/tests/tours/website_livechat_chatbot_flow.js @@ -17,6 +17,12 @@ LivechatButton.include({ return this._super(...arguments); }, + _renderMessages: function () { + this._super(...arguments); + + this._chatWindow.$('.o_livechat_chatbot_main_restart') + .addClass('ready'); + }, /** * Small override that removes current messages when restarting. * This allows to easily check for new posted messages without having the old ones "polluting" @@ -118,7 +124,7 @@ tour.register('website_livechat_chatbot_flow_tour', { trigger: messagesContain("Ok bye!"), run: () => {} // last step is displayed }, { - trigger: '.o_livechat_chatbot_main_restart', + trigger: '.o_livechat_chatbot_main_restart.ready', run: 'click' }, { trigger: messagesContain("Restarting conversation..."),