[FIX] im_livechat: fix chat bot redirect tour

The `website_livechat.chatbot_redirect` tour checks that the chat bot
still works after redirection. The tour waits for the chat bot message
that indicates the redireciton was made. Since the tour restarts the
bot to test two differents flows, this message is already present
before the second redirection occurs. The tour should instead wait for
two occurences of this message the second time.

closes odoo/odoo#160296

X-original-commit: cfdcdc405751e2d8d81dbbec34894d3da9c005ef
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
This commit is contained in:
tsm-odoo
2024-04-03 14:29:13 +00:00
parent fb63a42a17
commit 06b7e8c29f
@@ -40,6 +40,7 @@ registry.category("web_tour.tours").add("website_livechat.chatbot_redirect", {
await contains(".o-mail-Message", {
text: "Tadam, we are on the page you asked for!",
target: this.$anchor[0],
count: 2,
});
const url = new URL(location.href);
if (url.pathname !== "/chatbot-redirect") {