From 60e165e60bfbc737ef3cf558f3143f96a709bfce Mon Sep 17 00:00:00 2001 From: Goaman Date: Tue, 27 Oct 2020 07:39:23 +0000 Subject: [PATCH] [IMP] wesbite: add comment in tour closes odoo/odoo#60784 Signed-off-by: David Monjoie (dmo) --- addons/test_website/static/tests/tours/reset_views.js | 3 +++ addons/website/static/tests/tours/html_editor.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/addons/test_website/static/tests/tours/reset_views.js b/addons/test_website/static/tests/tours/reset_views.js index fa39f73006a..6804fc0e9bf 100644 --- a/addons/test_website/static/tests/tours/reset_views.js +++ b/addons/test_website/static/tests/tours/reset_views.js @@ -33,8 +33,11 @@ tour.register('test_reset_page_view_complete_flow_part1', { trigger: "#oe_snippets .oe_snippet:has(.s_cover) .oe_snippet_thumbnail:not(.o_we_already_dragging)", run: () => { const wysiwyg = $('#wrapwrap').data('wysiwyg'); + // Retrieve the editor node. const node = wysiwyg.editorHelpers.getNodes(document.querySelector('#oe_structure_test_website_page'))[0]; if (node.dirty) { + // As the tour test selectors, add class for the next step + // to test if the node is dirty $('#oe_structure_test_website_page').addClass('o_dirty'); } }, diff --git a/addons/website/static/tests/tours/html_editor.js b/addons/website/static/tests/tours/html_editor.js index 8108c828992..b524ebe6e5e 100644 --- a/addons/website/static/tests/tours/html_editor.js +++ b/addons/website/static/tests/tours/html_editor.js @@ -24,8 +24,11 @@ tour.register('html_editor_multiple_templates', { trigger: '#oe_snippets .oe_snippet:has(.s_cover) .oe_snippet_thumbnail:not(.o_we_already_dragging)', run: () => { const wysiwyg = $('#wrapwrap').data('wysiwyg'); + // Retrieve the editor node. const node = wysiwyg.editorHelpers.getNodes(document.querySelector('#oe_structure_test_ui'))[0]; if (node.dirty) { + // As the tour test selectors, add class for the next step + // to test if the node is dirty $('#oe_structure_test_ui').addClass('o_dirty'); } },