summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/tests
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/tests')
-rw-r--r--addons/web_editor/static/tests/field_html_tests.js4
-rw-r--r--addons/web_editor/static/tests/test_utils.js5
2 files changed, 6 insertions, 3 deletions
diff --git a/addons/web_editor/static/tests/field_html_tests.js b/addons/web_editor/static/tests/field_html_tests.js
index e72b836d83c..7e49f7fce01 100644
--- a/addons/web_editor/static/tests/field_html_tests.js
+++ b/addons/web_editor/static/tests/field_html_tests.js
@@ -284,9 +284,7 @@ QUnit.module('web_editor', {}, function () {
await testUtils.dom.click($('.modal #editor-media-image .o_existing_attachment_cell:first').removeClass('d-none'));
var $editable = form.$('.oe_form_field[name="body"] .note-editable');
-
- assert.strictEqual($editable.data('wysiwyg').getValue(),
- '<p>t<img class="img-fluid o_we_custom_image" data-src="/web_editor/static/src/img/transparent.png">oto toto toto</p><p>tata</p>',
+ assert.ok($editable.find('img')[0].dataset.src.includes('/web_editor/static/src/img/transparent.png'),
"should have the image in the dom");
testUtils.mock.unpatch(MediaDialog);
diff --git a/addons/web_editor/static/tests/test_utils.js b/addons/web_editor/static/tests/test_utils.js
index 74a2ba1f3d8..fcbf52f2521 100644
--- a/addons/web_editor/static/tests/test_utils.js
+++ b/addons/web_editor/static/tests/test_utils.js
@@ -259,6 +259,11 @@ function wysiwygData(data) {
string: "image_height",
type: 'integer',
},
+ original_id: {
+ string: "original_id",
+ type: 'many2one',
+ relation: 'ir.attachment',
+ },
},
records: [{
id: 1,