8
0
Prechádzať zdrojové kódy

Add test for normal selection inside a table.

Maciej Gołaszewski 5 rokov pred
rodič
commit
8c8fc62750

+ 14 - 0
packages/ckeditor5-table/tests/tableselection-clipboard.js

@@ -40,6 +40,20 @@ describe( 'table selection', () => {
 
 	describe( 'Clipboard integration', () => {
 		describe( 'copy', () => {
+			it( 'should to nothing for normal selection in table', () => {
+				const dataTransferMock = createDataTransfer();
+				const spy = sinon.spy();
+
+				viewDocument.on( 'clipboardOutput', spy );
+
+				viewDocument.fire( 'copy', {
+					dataTransfer: dataTransferMock,
+					preventDefault: sinon.spy()
+				} );
+
+				sinon.assert.calledOnce( spy );
+			} );
+
 			it( 'should copy selected table cells as standalone table', done => {
 				const dataTransferMock = createDataTransfer();
 				const preventDefaultSpy = sinon.spy();