Skip to content

Commit 346caf6

Browse files
authored
refactor: removed IE and MS Edge Legacy leftovers from test\client\legacy-fixtures\api (#7962)
<!-- Thank you for your contribution. Before making a PR, please read our contributing guidelines at https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution We recommend creating a *draft* PR, so that you can mark it as 'ready for review' when you are done. --> ## Purpose _Describe the problem you want to address or the feature you want to implement._ ## Approach _Describe how your changes address the issue or implement the desired functionality in as much detail as possible._ ## References _Provide a link to the existing issue(s), if any._ ## Pre-Merge TODO - [ ] Write tests for your proposed changes - [ ] Make sure that existing tests do not fail
1 parent 22d4a57 commit 346caf6

File tree

4 files changed

+3
-27
lines changed

4 files changed

+3
-27
lines changed

test/client/legacy-fixtures/api/click-test.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ $(document).ready(function () {
6464
};
6565

6666
const startNext = function () {
67-
if (browserUtils.isIE) {
68-
removeTestElements();
69-
window.setTimeout(start, 30);
70-
}
71-
else
72-
start();
67+
start();
7368
};
7469

7570
const runAsyncTest = function (actions, assertions, timeout) {
@@ -147,8 +142,7 @@ $(document).ready(function () {
147142
});
148143

149144
QUnit.testDone(function () {
150-
if (!browserUtils.isIE)
151-
removeTestElements();
145+
removeTestElements();
152146

153147
SETTINGS.ENABLE_SOURCE_INDEX = false;
154148
currentErrorType = null;

test/client/legacy-fixtures/api/drag-test.js

-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ const correctTestWaitingTime = function (time) {
2323
};
2424

2525
$(document).ready(function () {
26-
// NOTE: remove this after fix IE tests in iFrame
27-
$('body').css('border', '0px');
28-
2926
// NOTE: prevent auto scrolling
3027
if (browserUtils.isSafari && featureDetection.isTouchDevice) {
3128
const $meta = $('<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, shrink-to-fit=no">');

test/client/legacy-fixtures/api/press-test.js

-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const hammerhead = window.getTestCafeModule('hammerhead');
2-
const browserUtils = hammerhead.utils.browser;
32
const iframeSandbox = hammerhead.sandbox.iframe;
43

54
const testCafeCore = window.getTestCafeModule('testCafeCore');
@@ -231,10 +230,6 @@ $(document).ready(function () {
231230
iframe.contentDocument.body.appendChild(link);
232231
link.focus();
233232

234-
// NOTE: we need setTimeout to wait for focus in IE
235-
return wait(browserUtils.isIE ? 1000 : 0);
236-
})
237-
.then(function () {
238233
equal(domUtils.getActiveElement(), iframe);
239234
equal(domUtils.getActiveElement(iframe.contentDocument), link);
240235

@@ -286,10 +281,6 @@ $(document).ready(function () {
286281
iframe.contentDocument.body.appendChild(link);
287282
link.focus();
288283

289-
// NOTE: we need setTimeout to wait for focus in IE
290-
return wait(browserUtils.isIE ? 1000 : 0);
291-
})
292-
.then(function () {
293284
equal(domUtils.getActiveElement(), iframe);
294285
equal(domUtils.getActiveElement(iframe.contentDocument), link);
295286

test/client/legacy-fixtures/api/select-test/index-test.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const hammerhead = window.getTestCafeModule('hammerhead');
2-
const browserUtils = hammerhead.utils.browser;
32
const featureDetection = hammerhead.utils.featureDetection;
43

54
const testCafeCore = window.getTestCafeModule('testCafeCore');
@@ -21,7 +20,7 @@ const initAutomation = testCafeLegacyRunner.get('./init-automation');
2120
initAutomation();
2221

2322
const correctTestWaitingTime = function (time) {
24-
if (featureDetection.isTouchDevice || featureDetection.hasTouchPoints)
23+
if (featureDetection.isTouchDevice)
2524
return time * 2;
2625

2726
return time;
@@ -214,11 +213,6 @@ $(document).ready(function () {
214213

215214
$('body').css('height', '1500px');
216215

217-
//NOTE: problem with window.top bodyMargin in IE9 if test 'runAll'
218-
//because we can't determine that element is in qunit test iframe
219-
if (browserUtils.isIE9)
220-
$(window.top.document).find('body').css('marginTop', '0px');
221-
222216
//tests
223217
QUnit.testStart(function () {
224218
asyncActionCallback = function () {

0 commit comments

Comments
 (0)