diff options
| author | Romain Derie <rde@odoo.com> | 2019-02-13 18:02:00 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2019-02-13 18:02:00 +0000 |
| commit | 74a98ea0be3678466e303583d3d322892d9b75e3 (patch) | |
| tree | aab6c125187b2c6cb256b6f5e678c51212791fe2 /addons/website/static/src/js/html_editor.test.js | |
| parent | 63e64c5420c416e25efad1b6ba96e04a05a4ea53 (diff) | |
[FIX] website: adapt tests to new editor and new html editor
Scss tour was broken due to recent task that shows only 2 new custom scss
files if not in edit mode. As the tests was trying to read `website.ui.scss`
that is now in debug mode in a filter, it would not be found.
Html tour was broken due to new editor that changed the save process.
For some reason, after the drag & drop of a snippet, clicking fast on save
would not fire RPCs as it would not be considered as dirty.
(Editor would then close, you would still see the modifications even if nothing
was saved on DB)
closes odoo/odoo#31067
Diffstat (limited to 'addons/website/static/src/js/html_editor.test.js')
| -rw-r--r-- | addons/website/static/src/js/html_editor.test.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/website/static/src/js/html_editor.test.js b/addons/website/static/src/js/html_editor.test.js index 6c7633cf7aa..99f93eb069a 100644 --- a/addons/website/static/src/js/html_editor.test.js +++ b/addons/website/static/src/js/html_editor.test.js @@ -23,7 +23,7 @@ tour.register('html_editor_multiple_templates', { }, { content: "save the page", - extra_trigger: '#wrapwrap .s_cover', + extra_trigger: '#oe_structure_test_ui.o_dirty', trigger: "#web_editor-top-edit button[data-action=save]", }, // 2. Edit generic aboutus view @@ -99,17 +99,17 @@ tour.register('test_html_editor_scss', { trigger: '.o_ace_type_switcher_choice[data-type="scss"]', }, { - content: "select 'website.ui.scss'", - trigger: '#ace-scss-list', + content: "select 'user_custom_rules'", + trigger: 'body:has(#ace-scss-list option:contains("user_custom_rules"))', run: function () { - var scssId = $('#ace-scss-list option:contains("website.ui")').val(); + var scssId = $('#ace-scss-list option:contains("user_custom_rules")').val(); $('#ace-scss-list').val(scssId).trigger('change'); }, }, // 2. Edit that file and ensure it was saved then reset it { content: "add some scss content in the file", - trigger: 'div.ace_line .ace_variable:contains("body.o_connected_user")', + trigger: 'div.ace_line .ace_comment:contains("footer {")', run: function () { ace.edit('ace-view-editor').getSession().insert({row: 2, column: 0}, '#wrap {display: none;}\n'); }, |
