From 4a8ec08bbeceeb78900dc1b46bd4ce8113778757 Mon Sep 17 00:00:00 2001 From: helen-dikareva Date: Wed, 11 Apr 2018 15:56:17 +0300 Subject: [PATCH] test fixed --- test/client/fixtures/sandbox/selection-test.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/client/fixtures/sandbox/selection-test.js b/test/client/fixtures/sandbox/selection-test.js index 0608fbf48..5271738c9 100644 --- a/test/client/fixtures/sandbox/selection-test.js +++ b/test/client/fixtures/sandbox/selection-test.js @@ -130,10 +130,11 @@ asyncTest('Focus should not be called during setting selection if conteneditable }); asyncTest('Focus should not be called during setting selection if editable element has been already focused (TestCafe GH - 2301)', function () { - var input = createTestInput('text', 'some text'); - var focused = false; - var startPos = 1; - var endPos = 3; + var input = createTestInput('text', 'some text'); + var focused = false; + var shouldBeFocused = browserUtils.isIE11 || browserUtils.isMSEdge || browserUtils.isSafari; + var startPos = 1; + var endPos = 3; var isSelectionSet = function () { strictEqual(input.selectionStart, startPos); @@ -147,7 +148,7 @@ asyncTest('Focus should not be called during setting selection if editable eleme input.setSelectionRange(startPos, endPos); window.setTimeout(function () { - strictEqual(focused, browserUtils.isIE11); + strictEqual(focused, shouldBeFocused); isSelectionSet(); input.focus();