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/test_website/static | |
| 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/test_website/static')
| -rw-r--r-- | addons/test_website/static/tests/tours/reset_views.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/addons/test_website/static/tests/tours/reset_views.js b/addons/test_website/static/tests/tours/reset_views.js index bc323eaec2f..0c7aa9517ad 100644 --- a/addons/test_website/static/tests/tours/reset_views.js +++ b/addons/test_website/static/tests/tours/reset_views.js @@ -3,6 +3,15 @@ odoo.define('test_website.reset_views', function (require) { var tour = require("web_tour.tour"); +var BROKEN_STEP = { + // because saving a broken template opens a recovery page with no assets + // there's no way for the tour to resume on the new page, and thus no way + // to properly wait for the page to be saved & reloaded in order to fix the + // race condition of a tour ending on a side-effect (with the possible + // exception of somehow telling the harness / browser to do it) + trigger: 'body', + run: function () {} +}; tour.register('test_reset_page_view_complete_flow_part1', { test: true, url: '/test_page_view', @@ -45,9 +54,8 @@ tour.register('test_reset_page_view_complete_flow_part1', { content: "save the html editor", extra_trigger: '.ace_content:contains("not.exist")', trigger: ".o_ace_view_editor button[data-action=save]", - } - - // 3. Reset the broken view + }, + BROKEN_STEP ] ); @@ -93,7 +101,8 @@ tour.register('test_reset_page_view_complete_flow_part2', { { content: "save the html editor", trigger: ".o_ace_view_editor button[data-action=save]", - } + }, + BROKEN_STEP ] ); |
