@@ -20,7 +20,6 @@ import { parse, setData as setViewData, getData as getViewData } from '../../src
20
20
import { INLINE_FILLER , INLINE_FILLER_LENGTH , isBlockFiller , BR_FILLER } from '../../src/view/filler' ;
21
21
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils' ;
22
22
import createElement from '@ckeditor/ckeditor5-utils/src/dom/createelement' ;
23
- import log from '@ckeditor/ckeditor5-utils/src/log' ;
24
23
import { unwrap , insert , remove } from '../../src/view/writer' ;
25
24
import normalizeHtml from '@ckeditor/ckeditor5-utils/tests/_utils/normalizehtml' ;
26
25
@@ -1459,11 +1458,7 @@ describe( 'Renderer', () => {
1459
1458
describe ( 'similar selection' , ( ) => {
1460
1459
// Use spies to check selection updates. Some selection positions are not achievable in some
1461
1460
// browsers (e.g. <p>Foo<b>{}Bar</b></p> in Chrome) so asserting dom selection after rendering would fail.
1462
- let selectionCollapseSpy , selectionExtendSpy , logWarnStub ;
1463
-
1464
- before ( ( ) => {
1465
- logWarnStub = sinon . stub ( log , 'warn' ) ;
1466
- } ) ;
1461
+ let selectionCollapseSpy , selectionExtendSpy ;
1467
1462
1468
1463
afterEach ( ( ) => {
1469
1464
if ( selectionCollapseSpy ) {
@@ -1475,11 +1470,6 @@ describe( 'Renderer', () => {
1475
1470
selectionExtendSpy . restore ( ) ;
1476
1471
selectionExtendSpy = null ;
1477
1472
}
1478
- logWarnStub . reset ( ) ;
1479
- } ) ;
1480
-
1481
- after ( ( ) => {
1482
- logWarnStub . restore ( ) ;
1483
1473
} ) ;
1484
1474
1485
1475
it ( 'should always render collapsed selection even if it is similar' , ( ) => {
@@ -1520,7 +1510,6 @@ describe( 'Renderer', () => {
1520
1510
expect ( selectionCollapseSpy . calledWith ( domB . childNodes [ 0 ] , 0 ) ) . to . true ;
1521
1511
expect ( selectionExtendSpy . calledOnce ) . to . true ;
1522
1512
expect ( selectionExtendSpy . calledWith ( domB . childNodes [ 0 ] , 0 ) ) . to . true ;
1523
- expect ( logWarnStub . notCalled ) . to . true ;
1524
1513
} ) ;
1525
1514
1526
1515
it ( 'should always render collapsed selection even if it is similar (with empty element)' , ( ) => {
@@ -1560,7 +1549,6 @@ describe( 'Renderer', () => {
1560
1549
expect ( selectionCollapseSpy . calledWith ( domP . childNodes [ 0 ] , 3 ) ) . to . true ;
1561
1550
expect ( selectionExtendSpy . calledOnce ) . to . true ;
1562
1551
expect ( selectionExtendSpy . calledWith ( domP . childNodes [ 0 ] , 3 ) ) . to . true ;
1563
- expect ( logWarnStub . notCalled ) . to . true ;
1564
1552
} ) ;
1565
1553
1566
1554
it ( 'should always render non-collapsed selection if it not is similar' , ( ) => {
@@ -1601,7 +1589,6 @@ describe( 'Renderer', () => {
1601
1589
expect ( selectionCollapseSpy . calledWith ( domP . childNodes [ 0 ] , 2 ) ) . to . true ;
1602
1590
expect ( selectionExtendSpy . calledOnce ) . to . true ;
1603
1591
expect ( selectionExtendSpy . calledWith ( domB . childNodes [ 0 ] , 1 ) ) . to . true ;
1604
- expect ( logWarnStub . notCalled ) . to . true ;
1605
1592
} ) ;
1606
1593
1607
1594
it ( 'should always render selection (even if it is same in view) if current dom selection is in incorrect place' , ( ) => {
@@ -1669,7 +1656,6 @@ describe( 'Renderer', () => {
1669
1656
1670
1657
expect ( selectionCollapseSpy . notCalled ) . to . true ;
1671
1658
expect ( selectionExtendSpy . notCalled ) . to . true ;
1672
- expect ( logWarnStub . called ) . to . true ;
1673
1659
} ) ;
1674
1660
1675
1661
it ( 'should not render non-collapsed selection it is similar (element end)' , ( ) => {
@@ -1708,7 +1694,6 @@ describe( 'Renderer', () => {
1708
1694
1709
1695
expect ( selectionCollapseSpy . notCalled ) . to . true ;
1710
1696
expect ( selectionExtendSpy . notCalled ) . to . true ;
1711
- expect ( logWarnStub . called ) . to . true ;
1712
1697
} ) ;
1713
1698
1714
1699
it ( 'should not render non-collapsed selection it is similar (element start - nested)' , ( ) => {
@@ -1747,7 +1732,6 @@ describe( 'Renderer', () => {
1747
1732
1748
1733
expect ( selectionCollapseSpy . notCalled ) . to . true ;
1749
1734
expect ( selectionExtendSpy . notCalled ) . to . true ;
1750
- expect ( logWarnStub . called ) . to . true ;
1751
1735
} ) ;
1752
1736
1753
1737
it ( 'should not render non-collapsed selection it is similar (element end - nested)' , ( ) => {
@@ -1785,7 +1769,6 @@ describe( 'Renderer', () => {
1785
1769
1786
1770
expect ( selectionCollapseSpy . notCalled ) . to . true ;
1787
1771
expect ( selectionExtendSpy . notCalled ) . to . true ;
1788
- expect ( logWarnStub . called ) . to . true ;
1789
1772
} ) ;
1790
1773
} ) ;
1791
1774
} ) ;
0 commit comments