[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) <rde@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
This commit is contained in:
Nicolas (vin)
2022-10-31 12:42:25 +01:00
committed by Romain Derie
parent 391d5d9420
commit 9d4dd8a742
@@ -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",