diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-06-03 15:49:31 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-06-03 15:49:31 +0200 |
| commit | c8d7ad9a6bc55af465392d772ae15e981d0f80c7 (patch) | |
| tree | e9423fa8d28f85b8ad6a1a16e59afadb8db441e9 /addons/web_editor/static/tests | |
| parent | 8085f259c87f1e6b7f9cf89067f56b327b8936e3 (diff) | |
| parent | 995aa1685eece9ff1070a637d19d511fb1f80260 (diff) | |
[MERGE] forward port branch saas-12.2 up to 995aa1685ee
Diffstat (limited to 'addons/web_editor/static/tests')
| -rw-r--r-- | addons/web_editor/static/tests/wysiwyg_tests.js | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/addons/web_editor/static/tests/wysiwyg_tests.js b/addons/web_editor/static/tests/wysiwyg_tests.js index 7462f5a330b..e0e15304392 100644 --- a/addons/web_editor/static/tests/wysiwyg_tests.js +++ b/addons/web_editor/static/tests/wysiwyg_tests.js @@ -110,7 +110,7 @@ QUnit.test('Magic wand', async function (assert) { }); QUnit.test('Font style', function (assert) { - assert.expect(56); + assert.expect(58); return weTestUtils.createWysiwyg({ debug: false, @@ -283,6 +283,19 @@ QUnit.test('Font style', function (assert) { end: 'p:contents()[3]->2', }, }, + { + name: "Click BOLD: bold -> normal (at start of dom)", + content: '<p><b>abc</b></p>', + start: 'b:contents()[0]->0', + do: function () { + $btnBold.mousedown().click(); + }, + test: { + content: '<p>\u200B<b>abc</b></p>', + start: 'p:contents()[0]->1', + end: 'p:contents()[0]->1', + }, + }, /* ITALIC */ { name: "Click ITALIC: bold -> bold + italic", @@ -2227,7 +2240,7 @@ QUnit.test('Align', function (assert) { }); QUnit.test('Indent/outdent', function (assert) { - assert.expect(18); + assert.expect(20); return weTestUtils.createWysiwyg({ debug: false, @@ -2269,6 +2282,21 @@ QUnit.test('Indent/outdent', function (assert) { start: 'p:eq(1):contents()[0]->1', }, }, + { + name: "Click INDENT: li -> indented li", + content: '<p>aaa</p><p>bbb</p><p>ccc</p><p>ddd</p>', + start: 'p:eq(1):contents()[0]->0', + end: 'p:eq(3):contents()[0]->3', + do: function () { + $dropdownPara.mousedown().click(); + $btnIndent.mousedown().click(); + }, + test: { + content: '<p>aaa</p><p style="margin-left: 1.5em;">bbb</p><p style="margin-left: 1.5em;">ccc</p><p style="margin-left: 1.5em;">ddd</p>', + start: 'p:eq(1):contents()[0]->0', + end: 'p:eq(3):contents()[0]->3', + }, + }, /* OUTDENT */ { name: "Click OUTDENT: indented p -> p", |
