[FIX] website: reset password tour (in community)

The tour had been fixed for running headless, however that was only
checked in enterprise, and community turns out to have a more complex
loading sequence, and thus higher likelihood of dangling request: when
logging in, on enterprise the user lands on the applications screen
which performs no further RPC. On community however the homepage
triggers the Chatter action which can take some time to load after we
already see the user menu.

Add a community-only step which waits for chatter to load.

closes odoo/odoo#43936

X-original-commit: d7777044a7649a4809dd08f864bb8d43729b201e
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
Xavier Morel
2020-01-24 14:37:15 +00:00
parent 9831f5603c
commit 4baecc31df
@@ -138,20 +138,28 @@ tour.register('website_reset_password', {
},
},
{
content: "fill new password and submit",
trigger: '.oe_reset_password_form',
run: function () {
var $form = $('.oe_reset_password_form');
$form.find('input[name="password"]').val('adminadmin');
// password must be at least 8 if the module `auth_password_policy`
// is installed which is the case on runbot
$form.find('input[name="confirm_password"]').val('adminadmin');
$form.find('button[type="submit"]').click();
},
content: "fill new password",
trigger: '.oe_reset_password_form input[name="password"]',
run: "text adminadmin"
},
{
content: "check logged in, and reset admin website",
trigger: '.oe_topbar_name:contains("Admin")'
content: "fill confirm password",
trigger: '.oe_reset_password_form input[name="confirm_password"]',
run: "text adminadmin"
},
{
content: "submit reset password form",
trigger: '.oe_reset_password_form button[type="submit"]',
},
{
content: "check that we're logged in",
trigger: '.oe_topbar_name:contains("Admin")',
run: function () {}
},
{
content: "in community wait for chatter to be loaded",
trigger: 'li.breadcrumb-item:contains("#Inbox")',
edition: 'community'
}
]);
});