[FIX] website: fix a race condition on snippet_version tour

Commit [1] moved the edition of the website in the backend and
introduced an iframe as the editable. In doing so, some tour
actions became unstable.

The issue is that previously, when an action reloaded the page, the tour
service would reload as well. This is no longer the case and the tour
service stays active when the page is reloaded (e.g. when saving a
page). This can lead to a tour clicking on an item before it is ready to
be clicked.

Specifically in this case, the tour saved and clicked on edit as the
next step.
Clicking on edit before the page is properly reloaded leads to the click
being ignored.

This commit uses the util function `clickOnSave` which ensures we're out
of edit mode and the page is reloaded before doing anything else.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

runbot-4074

closes odoo/odoo#94932

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
Arthur Detroux (ard)
2022-06-30 18:52:16 +02:00
parent 315718ea66
commit 1dd75ea014
@@ -31,10 +31,8 @@ wTourUtils.registerEditionTour("snippet_version", {
console.error("error Dropped a s_test_snip snippet but missing s_share template name in it");
}
},
}, {
content: "Click on save button",
trigger: 'button[data-action="save"]',
},
...wTourUtils.clickOnSave(),
wTourUtils.clickOnEdit(),
{
content: "Modify the version of snippets",