Skip to content

Commit 63ba718

Browse files
committed
fix: eslint integ tests fails eraticaly in actions
1 parent 46662bd commit 63ba718

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ define(function (require, exports, module) {
135135
}
136136

137137
it("should show JSHint in desktop app if ESLint load failed for project", async function () {
138+
await SpecRunnerUtils.parkProject();
138139
await _openSimpleES6Project();
139140
await awaitsFor(async ()=>{
140141
await _fileSwitcherroForESLintFailDetection();

test/spec/SpecRunnerUtils.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,14 @@ define(function (require, exports, module) {
726726
return _testWindow;
727727
}
728728

729+
async function parkProject(closeAll) {
730+
if(closeAll){
731+
_testWindow.brackets.test.MainViewManager._closeAll(_testWindow.brackets.test.MainViewManager.ALL_PANES);
732+
}
733+
await window.Phoenix.VFS.ensureExistsDirAsync("/test/parked");
734+
await loadProjectInTestWindow("/test/parked");
735+
}
736+
729737
async function closeTestWindow(force, blankTestWindow) {
730738
//we need to mark the documents as not dirty before we close
731739
//or the window will stay open prompting to save
@@ -1507,8 +1515,9 @@ define(function (require, exports, module) {
15071515
exports.removeTempDirectory = removeTempDirectory;
15081516
exports.setUnitTestReporter = setUnitTestReporter;
15091517
exports.resizeEditor = resizeEditor;
1510-
exports.editorHasCursorPosition = editorHasCursorPosition;
1518+
exports.editorHasCursorPosition = editorHasCursorPosition;
15111519
exports.showQuickViewAtPos = showQuickViewAtPos;
1512-
exports.dismissQuickView = dismissQuickView;
1520+
exports.dismissQuickView = dismissQuickView;
1521+
exports.parkProject = parkProject;
15131522
exports.jsPromise = jsPromise;
15141523
});

0 commit comments

Comments
 (0)