Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 28b34d5

Browse files
authored
Merge pull request #212 from ckeditor/t/196
Tests: Fixed failed tests on other browsers than Chrome when using BrowserStack. Closes #196.
2 parents ebbd533 + 707dcf8 commit 28b34d5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/dom/rect.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ describe( 'Rect', () => {
435435
ancestorA = document.createElement( 'div' );
436436
ancestorB = document.createElement( 'div' );
437437

438-
ancestorA.append( element );
438+
ancestorA.appendChild( element );
439439
document.body.appendChild( ancestorA );
440440
} );
441441

@@ -575,7 +575,7 @@ describe( 'Rect', () => {
575575
} );
576576

577577
it( 'should return the visible rect (HTMLElement), partially cropped, deep ancestor overflow', () => {
578-
ancestorB.append( ancestorA );
578+
ancestorB.appendChild( ancestorA );
579579
document.body.appendChild( ancestorB );
580580

581581
testUtils.sinon.stub( element, 'getBoundingClientRect' ).returns( {
@@ -909,6 +909,9 @@ describe( 'Rect', () => {
909909
height: 230
910910
} );
911911

912+
// Safari fails because of "afterEach()" hook tries to restore values from removed element.
913+
// We need to restore these values manually.
914+
testUtils.sinon.restore();
912915
iframe.remove();
913916
done();
914917
} );

tests/dom/scroll.js

+3
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ describe( 'scrollViewportToShowTarget()', () => {
248248
} );
249249

250250
afterEach( () => {
251+
// Safari fails because of "afterEach()" hook tries to restore values from removed element.
252+
// We need to restore these values manually.
253+
testUtils.sinon.restore();
251254
iframeAncestor.remove();
252255
} );
253256

0 commit comments

Comments
 (0)