diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-01-17 07:02:01 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-01-21 06:56:15 +0000 |
| commit | d2c7efa9be66beb5d96fdffc3f849ddf136e20c9 (patch) | |
| tree | 8a0f8f228b2dbab8d5dc44e2b235b44e0975a980 /addons/website/static/tests | |
| parent | 9733f6e1ab31abf780a5ad671f700fac883b63ee (diff) | |
[FIX] website, test_website: problematic tours
Fix various tours which either have transient failures due to logging
the entire browser lifecycle or don't deal well with the last step
being suppressed if no explicit `run` is provided.
* test_website: add a warning final step for the page reset as there's
no way to actually run a tour step in the recovery page (because
it's asset-less)
* website: remove final step's action in reset password tour, it's
relatively low-value and adding a proper followup is probably not
worth the effort
* website: add final check step in dashboard tour, as we want to check
that the dashboard gets loaded, but we don't want that to be dangling
Diffstat (limited to 'addons/website/static/tests')
| -rw-r--r-- | addons/website/static/tests/tours/dashboard_tour.js | 9 | ||||
| -rw-r--r-- | addons/website/static/tests/tours/reset_password.js | 17 |
2 files changed, 6 insertions, 20 deletions
diff --git a/addons/website/static/tests/tours/dashboard_tour.js b/addons/website/static/tests/tours/dashboard_tour.js index a8566d63a97..b02747c6caa 100644 --- a/addons/website/static/tests/tours/dashboard_tour.js +++ b/addons/website/static/tests/tours/dashboard_tour.js @@ -9,13 +9,14 @@ tour.register("backend_dashboard", { }, [tour.STEPS.SHOW_APPS_MENU_ITEM, { trigger: 'a[data-menu-xmlid="website.menu_website_configuration"]', - run: 'click', }, { trigger: '.dropdown-toggle[data-menu-xmlid="website.menu_dashboard"]', - run: 'click', }, { trigger: '.dropdown-item[data-menu-xmlid="website.menu_website_google_analytics"]', - content: 'Check if traceback', - run: 'click', +}, { + // Visits section should always be present even when empty / not hooked to anything + trigger: 'h2:contains("Visits")', + content: "Check if dashboard loads", + run: function () {} }]); }); diff --git a/addons/website/static/tests/tours/reset_password.js b/addons/website/static/tests/tours/reset_password.js index 98ce641373f..2e3d00740d9 100644 --- a/addons/website/static/tests/tours/reset_password.js +++ b/addons/website/static/tests/tours/reset_password.js @@ -151,22 +151,7 @@ tour.register('website_reset_password', { }, { content: "check logged in, and reset admin website", - trigger: '.oe_topbar_name:contains("Admin")', - run: function () { - return rpc.query({ - model: 'res.partner', - method: 'name_search', - kwargs: {'name': 'Admin'}, - }).then(function (res) { - return rpc.query({ - 'model': 'res.partner', - 'method': 'write', - 'args': [[res[0][0]], { - 'website_id': false, - }], - }); - }); - }, + trigger: '.oe_topbar_name:contains("Admin")' }, ]); }); |
