Skip to content

Commit 8d406ae

Browse files
committed
fix: windows desktop eslint integ tests fails due to timouts
1 parent df22b67 commit 8d406ae

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

test/spec/Extn-ESLint-integ-test.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ define(function (require, exports, module) {
8787
async function _waitForProblemsPanelVisible(visible) {
8888
await awaitsFor(()=>{
8989
return $("#problems-panel").is(":visible") === visible;
90-
}, "Problems panel to be visible");
90+
}, "Problems panel to be visible", 15000);
9191
}
9292

9393
async function _openSimpleES6Project() {
@@ -160,20 +160,20 @@ define(function (require, exports, module) {
160160
await _waitForProblemsPanelVisible(true);
161161
await awaitsFor(()=>{
162162
return $("#problems-panel").text().includes(Strings.DESCRIPTION_ESLINT_LOAD_FAILED);
163-
}, "ESLint v6 not supported error to be shown");
163+
}, "ESLint v6 not supported error to be shown", 15000);
164164
}
165165

166166
it("should ESLint v6 show unsupported version error", async function () {
167167
await _loadAndValidateES6Project();
168-
}, 5000);
168+
}, 30000);
169169

170170
it("should show ESLint and JSHint in desktop app for es6 project or below", async function () {
171171
await _loadAndValidateES6Project();
172172
await awaitsFor(async ()=>{
173173
await _fileSwitcherroForESLintFailDetection();
174174
return $("#problems-panel").text().includes(JSHintErrorES6Error_js);
175175
}, "JShint error to be shown", 3000, 300);
176-
}, 5000);
176+
}, 30000);
177177
});
178178

179179
describe("ES7 and JSHint project", function () {
@@ -190,20 +190,20 @@ define(function (require, exports, module) {
190190
await _waitForProblemsPanelVisible(true);
191191
await awaitsFor(()=>{
192192
return $("#problems-panel").text().includes(ESLintErrorES7Error_js);
193-
}, "ESLint v7 error to be shown");
193+
}, "ESLint v7 error to be shown", 15000);
194194
}
195195

196196
it("should ESLint v7 work as expected", async function () {
197197
await _loadAndValidateES7Project();
198-
}, 5000);
198+
}, 30000);
199199

200200
it("should show ESLint and JSHint in desktop app if .jshintrc Present", async function () {
201201
await _loadAndValidateES7Project();
202202
await awaitsFor(()=>{
203203
return $("#problems-panel").text().includes(JSHintErrorES6Error_js);
204-
}, "JShint error to be shown");
204+
}, "JShint error to be shown", 10000);
205205
expect($("#problems-panel").text().includes("JSHint")).toBeTrue();
206-
}, 5000);
206+
}, 30000);
207207
});
208208

209209
describe("ES8 with react js support project", function () { // this should cover es7 too
@@ -220,8 +220,8 @@ define(function (require, exports, module) {
220220
await _waitForProblemsPanelVisible(true);
221221
await awaitsFor(()=>{
222222
return $("#problems-panel").text().includes(ESLintReactError_js);
223-
}, "ESLint jsx error to be shown");
224-
}, 5000);
223+
}, "ESLint jsx error to be shown", 15000);
224+
}, 30000);
225225
});
226226

227227
// we should have an es9 test too as above, but es9 currently doesnt support jsx
@@ -241,25 +241,25 @@ define(function (require, exports, module) {
241241
await _waitForProblemsPanelVisible(true);
242242
await awaitsFor(()=>{
243243
return $("#problems-panel").text().includes(ESLintErrorES8Error_js);
244-
}, "ESLint v8 error to be shown");
244+
}, "ESLint v8 error to be shown", 15000);
245245
}
246246

247247
it("should ESLint v8 work as expected", async function () {
248248
await _loadAndValidateES8Project();
249-
}, 5000);
249+
}, 30000);
250250

251251
it("should not lint jsx file as ESLint v8 is not configured for react lint", async function () {
252252
await _openProjectFile("react.jsx");
253253
await awaits(100); // Just wait for some time to prevent any false linter runs
254254
await _waitForProblemsPanelVisible(false);
255255
expect($("#status-inspection").hasClass("inspection-disabled")).toBeTrue();
256-
}, 5000);
256+
}, 30000);
257257

258258
it("should not show JSHint in desktop app if ESLint is active", async function () {
259259
await _loadAndValidateES8Project();
260260
await awaits(100); // give some time so that jshint has time to complete if there is any.
261261
expect($("#problems-panel").text().includes("JSHint")).toBeFalse();
262-
}, 5000);
262+
}, 30000);
263263
});
264264

265265
describe("ES Latest module project", function () {
@@ -373,7 +373,7 @@ define(function (require, exports, module) {
373373
await _waitForProblemsPanelVisible(true);
374374
await awaitsFor(()=>{
375375
return $("#problems-panel").find(".ph-fix-problem").length === 2;
376-
}, "There should be 2 fix problem button in the panel");
376+
}, "There should be 2 fix problem button in the panel", 15000);
377377
}
378378

379379
async function _triggerLint() {
@@ -383,15 +383,15 @@ define(function (require, exports, module) {
383383

384384
it("should ESLint v9 show fix buttons", async function () {
385385
await _openAndVerifyInitial();
386-
}, 5000);
386+
}, 30000);
387387

388388
it("should be able to fix 1 error", async function () {
389389
await _openAndVerifyInitial();
390390
// click on fix : Expected indentation of 4 spaces but found 9. ESLint (indent)
391391
$($("#problems-panel").find(".ph-fix-problem")[0]).click();
392392
await awaitsFor(()=>{
393393
return $("#problems-panel").find(".ph-fix-problem").length === 1;
394-
}, "only 1 problem should remain");
394+
}, "only 1 problem should remain", 15000);
395395

396396
// it should select the edited text
397397
const editor = EditorManager.getCurrentFullEditor();
@@ -406,8 +406,8 @@ define(function (require, exports, module) {
406406
await _triggerLint();
407407
await awaitsFor(()=>{
408408
return $("#problems-panel").find(".ph-fix-problem").length === 2;
409-
}, "2 problem should be there");
410-
}, 5000);
409+
}, "2 problem should be there", 15000);
410+
}, 30000);
411411

412412
it("should be able to fix all errors", async function () {
413413
await _openAndVerifyInitial();
@@ -417,7 +417,7 @@ define(function (require, exports, module) {
417417
$($("#problems-panel").find(".problems-fix-all-btn")).click();
418418
await awaitsFor(()=>{
419419
return $("#problems-panel").find(".ph-fix-problem").length === 0;
420-
}, "no problems should remain as all is now fixed");
420+
}, "no problems should remain as all is now fixed", 15000);
421421

422422
// fixing multiple should place the cursor on first fix
423423
expect(editor.hasSelection()).toBeFalse();
@@ -430,8 +430,8 @@ define(function (require, exports, module) {
430430
await _triggerLint();
431431
await awaitsFor(()=>{
432432
return $("#problems-panel").find(".ph-fix-problem").length === 2;
433-
}, "2 problem should be there");
434-
}, 5000);
433+
}, "2 problem should be there", 15000);
434+
}, 30000);
435435
});
436436
});
437437
});

0 commit comments

Comments
 (0)