From 9d4dd8a74207edc02093aa64862f6cd12ea5346e Mon Sep 17 00:00:00 2001 From: "Nicolas (vin)" Date: Fri, 28 Oct 2022 11:44:09 +0000 Subject: [PATCH] [FIX] website: avoid timeout on website switching in testing suite The tour snippet_cache_across_websites is at some point switching between websites. The selector would be taking the second option in the website list, which may not be correct if a module is adding a website in its demo data. This change aim to always switch from website 1 to website 2, without caring about any other potentially existing website. closes odoo/odoo#104596 X-original-commit: 7f756cfd5abc740e1a93a3225481c36279f094ed Related: odoo/enterprise#33444 Signed-off-by: Romain Derie (rde) Signed-off-by: Nicolas Viseur (vin) --- .../website/static/tests/tours/snippet_cache_across_websites.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/tests/tours/snippet_cache_across_websites.js b/addons/website/static/tests/tours/snippet_cache_across_websites.js index 5eafd88fbaf..e285d72402e 100644 --- a/addons/website/static/tests/tours/snippet_cache_across_websites.js +++ b/addons/website/static/tests/tours/snippet_cache_across_websites.js @@ -22,7 +22,7 @@ wTourUtils.registerWebsitePreviewTour('snippet_cache_across_websites', { content: "Switch to website 2", // Ensure data-website-id exists extra_trigger: 'iframe html[data-website-id="1"]', - trigger: '.o_website_switcher_container .dropdown-item:nth-child(2)' + trigger: '.o_website_switcher_container .dropdown-item:contains("My Website 2")' }, { content: "Wait for the iframe to be loaded",