[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
This commit is contained in:
@@ -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');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user