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'); } },