Skip to content

Commit 5c58735

Browse files
authored
refactor: removed IE and MS Edge Legacy leftovers from test\client\fixtures (#7960)
<!-- 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 6424187 commit 5c58735

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

test/client/fixtures/core/array-utils-test.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
const hammerhead = window.getTestCafeModule('hammerhead');
2-
const browserUtils = hammerhead.utils.browser;
3-
41
const testCafeCore = window.getTestCafeModule('testCafeCore');
52
const arrayUtils = testCafeCore.arrayUtils;
63

@@ -139,11 +136,9 @@ test('isArray()', function () {
139136
test('from()', function () {
140137
deepEqual(arrayUtils.from('foo'), ['f', 'o', 'o']);
141138

142-
if (!browserUtils.isIE) {
143-
deepEqual(arrayUtils.from(array, function (x) {
144-
return x + x;
145-
}), [2, 4, 6, 8, 10]);
146-
}
139+
deepEqual(arrayUtils.from(array, function (x) {
140+
return x + x;
141+
}), [2, 4, 6, 8, 10]);
147142
});
148143

149144
test('find()', function () {

test/client/fixtures/core/dom-utils-test.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
const hammerhead = window.getTestCafeModule('hammerhead');
2-
const browserUtils = hammerhead.utils.browser;
31
const testCafeCore = window.getTestCafeModule('testCafeCore');
42
const domUtils = testCafeCore.domUtils;
53

64
asyncTest('isIFrameWindowInDOM', function () {
7-
expect(browserUtils.isIE ? 2 : 1);
5+
expect(1);
86

97
let messageCounter = 0;
108

@@ -17,15 +15,10 @@ asyncTest('isIFrameWindowInDOM', function () {
1715
if (messageCounter === 0) {
1816
equal(event.data, 'true');
1917

20-
const iFramePostMessage = iframe.contentWindow.postMessage.bind(iframe.contentWindow);
21-
2218
document.body.removeChild(iframe);
2319

2420
//NOTE: In WebKit, scripts cannot be executed in a removed iframe. Therefore, the test is finished here.
25-
if (browserUtils.isIE)
26-
iFramePostMessage('isIFrameWindowInDOM', '*');
27-
else
28-
finishTest();
21+
finishTest();
2922
}
3023
else {
3124
equal(event.data, 'false');

test/client/fixtures/driver/script-execution-barrier-test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,12 @@ $(document).ready(function () {
8787
const emitter = new ScriptExecutionEmitter();
8888
const barrier = new ScriptExecutionBarrier(emitter);
8989

90-
let scriptCounter = 0;
91-
9290
window.stopAppending = false;
9391
window.appendCustomScript = function () {
9492
const script = document.createElement('script');
9593
const scriptContent = encodeURIComponent('if(!window.stopAppending)window.appendCustomScript()');
9694

97-
// HACK: we should request different URLs to avoid caching of response in IE 10
98-
script.src = '/xhr-test/' + scriptCounter + '?expectedResponse=' + scriptContent;
99-
scriptCounter++;
95+
script.src = '/xhr-test/50?expectedResponse=' + scriptContent;
10096

10197
document.body.appendChild(script);
10298
};

0 commit comments

Comments
 (0)