summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/tests
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-07-16 16:02:41 +0200
committerMartin Trigaux <mat@odoo.com>2019-07-16 16:36:40 +0200
commitbeba36416fdf25df74cf8a581c66948a418173b6 (patch)
treed24b8a373560afcc78bde4c9c06338800809abfa /addons/web_editor/static/tests
parent044904b9d50d61c5c7e5432a1b4615dda145704c (diff)
parent40421be73c94551ba902856984c0155d062cb449 (diff)
[MERGE] Forward port of saas-12.3 to saas-12.4 up to 40421be73c94551b
Diffstat (limited to 'addons/web_editor/static/tests')
-rw-r--r--addons/web_editor/static/tests/wysiwyg_keyboard_tests.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js b/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js
index 6c08fec0d98..8721407230c 100644
--- a/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js
+++ b/addons/web_editor/static/tests/wysiwyg_keyboard_tests.js
@@ -814,6 +814,18 @@ var keyboardTestsChar = [{
start: "b:contents(0)->1",
},
},
+ {
+ name: "'a' in empty li",
+ content: '<ul><li><p><br></p></li></ul>',
+ steps: [{
+ start: "p->1",
+ key: 'a',
+ }],
+ test: {
+ content: '<ul><li><p>a</p></li></ul>',
+ start: "p:contents(0)->1",
+ },
+ },
];
QUnit.test('Char', function (assert) {
@@ -2248,6 +2260,25 @@ var keyboardTestsComplex = [{
start: "p:eq(1)->0",
},
},
+ // List indent
+ {
+ name: "ENTER -> TAB -> a' at end of li > p (split -> indent -> write)",
+ content: '<ul><li><p>a</p></li></ul>',
+ steps: [{
+ start: "p:contents()[0]->1",
+ key: 'ENTER',
+ },
+ {
+ key: 'TAB',
+ },
+ {
+ key: 'a',
+ }],
+ test: {
+ content: '<ul><li><p>a</p></li><li class="o_indent"><ul><li><p>a</p></li></ul></li></ul>',
+ start: "p:eq(1):contents()[0]->1",
+ },
+ },
];
QUnit.test('Complex', function (assert) {