@@ -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
@@ -1503,11 +1502,7 @@ describe( 'Renderer', () => {
1503
1502
describe ( 'similar selection' , ( ) => {
1504
1503
// Use spies to check selection updates. Some selection positions are not achievable in some
1505
1504
// browsers (e.g. <p>Foo<b>{}Bar</b></p> in Chrome) so asserting dom selection after rendering would fail.
1506
- let selectionCollapseSpy , selectionExtendSpy , logWarnStub ;
1507
-
1508
- before ( ( ) => {
1509
- logWarnStub = sinon . stub ( log , 'warn' ) ;
1510
- } ) ;
1505
+ let selectionCollapseSpy , selectionExtendSpy ;
1511
1506
1512
1507
afterEach ( ( ) => {
1513
1508
if ( selectionCollapseSpy ) {
@@ -1519,11 +1514,6 @@ describe( 'Renderer', () => {
1519
1514
selectionExtendSpy . restore ( ) ;
1520
1515
selectionExtendSpy = null ;
1521
1516
}
1522
- logWarnStub . reset ( ) ;
1523
- } ) ;
1524
-
1525
- after ( ( ) => {
1526
- logWarnStub . restore ( ) ;
1527
1517
} ) ;
1528
1518
1529
1519
it ( 'should always render collapsed selection even if it is similar' , ( ) => {
@@ -1564,7 +1554,6 @@ describe( 'Renderer', () => {
1564
1554
expect ( selectionCollapseSpy . calledWith ( domB . childNodes [ 0 ] , 0 ) ) . to . true ;
1565
1555
expect ( selectionExtendSpy . calledOnce ) . to . true ;
1566
1556
expect ( selectionExtendSpy . calledWith ( domB . childNodes [ 0 ] , 0 ) ) . to . true ;
1567
- expect ( logWarnStub . notCalled ) . to . true ;
1568
1557
} ) ;
1569
1558
1570
1559
it ( 'should always render collapsed selection even if it is similar (with empty element)' , ( ) => {
@@ -1604,7 +1593,6 @@ describe( 'Renderer', () => {
1604
1593
expect ( selectionCollapseSpy . calledWith ( domP . childNodes [ 0 ] , 3 ) ) . to . true ;
1605
1594
expect ( selectionExtendSpy . calledOnce ) . to . true ;
1606
1595
expect ( selectionExtendSpy . calledWith ( domP . childNodes [ 0 ] , 3 ) ) . to . true ;
1607
- expect ( logWarnStub . notCalled ) . to . true ;
1608
1596
} ) ;
1609
1597
1610
1598
it ( 'should always render non-collapsed selection if it not is similar' , ( ) => {
@@ -1645,7 +1633,6 @@ describe( 'Renderer', () => {
1645
1633
expect ( selectionCollapseSpy . calledWith ( domP . childNodes [ 0 ] , 2 ) ) . to . true ;
1646
1634
expect ( selectionExtendSpy . calledOnce ) . to . true ;
1647
1635
expect ( selectionExtendSpy . calledWith ( domB . childNodes [ 0 ] , 1 ) ) . to . true ;
1648
- expect ( logWarnStub . notCalled ) . to . true ;
1649
1636
} ) ;
1650
1637
1651
1638
it ( 'should always render selection (even if it is same in view) if current dom selection is in incorrect place' , ( ) => {
@@ -1713,7 +1700,6 @@ describe( 'Renderer', () => {
1713
1700
1714
1701
expect ( selectionCollapseSpy . notCalled ) . to . true ;
1715
1702
expect ( selectionExtendSpy . notCalled ) . to . true ;
1716
- expect ( logWarnStub . called ) . to . true ;
1717
1703
} ) ;
1718
1704
1719
1705
it ( 'should not render non-collapsed selection it is similar (element end)' , ( ) => {
@@ -1752,7 +1738,6 @@ describe( 'Renderer', () => {
1752
1738
1753
1739
expect ( selectionCollapseSpy . notCalled ) . to . true ;
1754
1740
expect ( selectionExtendSpy . notCalled ) . to . true ;
1755
- expect ( logWarnStub . called ) . to . true ;
1756
1741
} ) ;
1757
1742
1758
1743
it ( 'should not render non-collapsed selection it is similar (element start - nested)' , ( ) => {
@@ -1791,7 +1776,6 @@ describe( 'Renderer', () => {
1791
1776
1792
1777
expect ( selectionCollapseSpy . notCalled ) . to . true ;
1793
1778
expect ( selectionExtendSpy . notCalled ) . to . true ;
1794
- expect ( logWarnStub . called ) . to . true ;
1795
1779
} ) ;
1796
1780
1797
1781
it ( 'should not render non-collapsed selection it is similar (element end - nested)' , ( ) => {
@@ -1829,7 +1813,6 @@ describe( 'Renderer', () => {
1829
1813
1830
1814
expect ( selectionCollapseSpy . notCalled ) . to . true ;
1831
1815
expect ( selectionExtendSpy . notCalled ) . to . true ;
1832
- expect ( logWarnStub . called ) . to . true ;
1833
1816
} ) ;
1834
1817
} ) ;
1835
1818
} ) ;
0 commit comments