summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2016-12-01 14:34:27 +0100
committerNicolas Lempereur <nle@odoo.com>2017-01-09 16:06:46 +0100
commit81b668c3e3e0766594d8a784f674bbbda047567f (patch)
tree5ef5f9e2d71228de39b28e2e4ab170d05f2830b5 /addons/web_editor/static/src
parent98ed53ce3aa0e7b83e23b506182df748dd6898c9 (diff)
[IMP] web_editor: tour testing inline editor saving (up to s11)
With 98ed53ce when a form view is saved when a html field is in code view mode, the change is not lost. This new backend tour check that when saving in or not in code view, the content is saved effectively. The test not in code view would ensure issues like #14381 #14351 #14394 are detected on runbot. closes #14475 opw-693052 note: the old test system is used so this test is only for up to saas-11
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/tour.rte.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/tour.rte.js b/addons/web_editor/static/src/js/tour.rte.js
index 8c3c494a73f..96a85114976 100644
--- a/addons/web_editor/static/src/js/tour.rte.js
+++ b/addons/web_editor/static/src/js/tour.rte.js
@@ -392,6 +392,51 @@ Tour.register({
});
+Tour.register({
+ id: 'rte_backend_inline',
+ name: "Test RTE in backend view",
+ mode: 'test',
+ steps: [
+ {
+ title: "Beginning test",
+ },
+ {
+ title: "Click on edit button",
+ element: '.o_form_button_edit, .oe_form_button_edit',
+ },
+ {
+ title: "Add text to inline html field and save",
+ element: '.o_form_button_save, .oe_form_button_save',
+ onload: function(){
+ $('.oe_form_field_html_text .note-editable > p').append('<i>world</i>');
+ },
+ },
+ {
+ title: "Verify saved data after edition then click on edit button",
+ waitFor: '.oe_form_field_html_text p > i:last-child:contains(world)',
+ element: '.o_form_button_edit, .oe_form_button_edit',
+ },
+ {
+ title: "Switch to code view mode",
+ element: 'button[data-event="codeview"]',
+ },
+ {
+ title: "Modify code view content and save",
+ element: '.o_form_button_save, .oe_form_button_save',
+ onload: function(){
+ $('.oe_form_field_html_text textarea.note-codable').val(function(_, val){
+ return val.replace('</p>', '<u>!</u></p>');
+ });
+ },
+ },
+ {
+ title: "Verify saved data after code view edition",
+ waitFor: '.oe_form_field_html_text p > u:last-child:contains(!)',
+ },
+ ]
+});
+
+
});
});