summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/tests/field_html_tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/tests/field_html_tests.js')
-rw-r--r--addons/web_editor/static/tests/field_html_tests.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/addons/web_editor/static/tests/field_html_tests.js b/addons/web_editor/static/tests/field_html_tests.js
index 73ef267bbf8..31855ef9ff7 100644
--- a/addons/web_editor/static/tests/field_html_tests.js
+++ b/addons/web_editor/static/tests/field_html_tests.js
@@ -491,6 +491,26 @@ QUnit.module('web_editor', {}, function () {
form.destroy();
});
+QUnit.test('save immediately before iframe is rendered in edit mode', async function (assert) {
+ assert.expect(1);
+
+ var form = await testUtils.createAsyncView({
+ View: FormView,
+ model: 'note.note',
+ data: this.data,
+ arch: '<form>' +
+ '<field name="body" widget="html" style="height: 100px" options="{\'cssEdit\': \'template.assets\'}"/>' +
+ '</form>',
+ res_id: 1,
+ });
+ testUtils.form.clickEdit(form);
+ await testUtils.nextTick();
+ testUtils.form.clickSave(form);
+ await testUtils.nextTick();
+ assert.ok(true, "No traceback encountered. The wysiwyg was cut while not loaded.");
+ form.destroy();
+});
+
QUnit.test('use colorpicker and save', async function (assert) {
assert.expect(1);