Skip to content
Permalink
Browse files

[IMP] web_editor: add tests for deleting all contents of format block

Implementing new behavior on delete all contents of a format block
revealed insufficient testing, which is now covered.

closes #31277
  • Loading branch information...
Zinston committed Feb 21, 2019
1 parent 2a010c3 commit 4339101afe090330b491d6f9f89ef9d787716d1c
Showing with 49 additions and 0 deletions.
  1. +49 −0 addons/web_editor/static/tests/wysiwyg_keyboard_tests.js
@@ -3110,6 +3110,55 @@ var keyboardTestsBackspace = [{
start: "p:eq(1):contents()[0]->1",
},
},
{
name: "in h1: BACKSPACE on full selection -> 'a'",
content: '<h1>dom to delete</h1>',
steps: [{
start: 'h1:contents()[0]->0',
end: 'h1:contents()[0]->13',
key: 'BACKSPACE',
}, {
key: 'a',
}],
test: {
content: '<h1>a</h1>',
start: "h1:contents()[0]->1",
},
},
{
name: "in h1: BACKSPACE on full selection -> BACKSPACE -> 'a'",
content: '<h1>dom to delete</h1>',
steps: [{
start: 'h1:contents()[0]->0',
end: 'h1:contents()[0]->13',
key: 'BACKSPACE',
}, {
key: 'BACKSPACE',
}, {
key: 'a',
}],
test: {
content: '<p>a</p>',
start: "p:contents()[0]->1",
},
},
{
name: "in h1: BACKSPACE on full selection -> DELETE -> 'a'",
content: '<h1>dom to delete</h1>',
steps: [{
start: 'h1:contents()[0]->0',
end: 'h1:contents()[0]->13',
key: 'BACKSPACE',
}, {
key: 'DELETE',
}, {
key: 'a',
}],
test: {
content: '<h1>a</h1>',
start: "h1:contents()[0]->1",
},
},

// merging non-similar blocks

0 comments on commit 4339101

Please sign in to comment.
You can’t perform that action at this time.