Skip to content

Commit

Permalink
Tests: added test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
engineering-this committed Apr 1, 2019
1 parent 6286179 commit 983588f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/plugins/widget/readonlyselection.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@
'test widget creation when selection starts at the beginning and ends at the end of a widget': assertEditorSelectionOnWidgetsCreation( {
initial: '<div contenteditable="false">[<div>FakeWidget</div></div>foo<div contenteditable="false"><div>FakeWidget</div>]</div>',
expected: '<div contenteditable="false"><div>FakeWidget</div></div>[foo]<div contenteditable="false"><div>FakeWidget</div></div>'
} ),
// (#2517)
'test widget creation when selection starts in the drag handler': assertEditorSelectionOnWidgetsCreation( {
initial: '<div contenteditable="false">' +
'<figure><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="><figcaption>caption</figcaption></figure>' +
'<span><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=">[<span></span></span></div>foo]',
expected: '<div contenteditable="false">' +
'<figure><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="><figcaption>caption</figcaption></figure>' +
'<span><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="><span></span></span></div>[foo]'
} )
};

Expand Down

0 comments on commit 983588f

Please sign in to comment.