From 4baecc31dfd3ac4d3edb4dcb24aacccb631d536b Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 24 Jan 2020 08:48:01 +0000 Subject: [PATCH] [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) --- .../static/tests/tours/reset_password.js | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/addons/website/static/tests/tours/reset_password.js b/addons/website/static/tests/tours/reset_password.js index 2e3d00740d9..a0e04ccae90 100644 --- a/addons/website/static/tests/tours/reset_password.js +++ b/addons/website/static/tests/tours/reset_password.js @@ -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' + } ]); });