|
19 | 19 | * |
20 | 20 | */ |
21 | 21 |
|
22 | | -/*global describe, beforeEach, beforeAll, afterAll, afterEach, it, expect, awaitsForDone, spyOn, jasmine, Phoenix */ |
| 22 | +/*global describe, beforeEach, beforeAll, afterAll, it, expect, awaitsForDone, spyOn, jasmine, awaitsFor */ |
23 | 23 |
|
24 | 24 | define(function (require, exports, module) { |
25 | 25 |
|
@@ -1009,6 +1009,28 @@ define(function (require, exports, module) { |
1009 | 1009 | expect(WorkspaceManager.removeEscapeKeyEventHandler("x")).toBeTrue(); |
1010 | 1010 | }); |
1011 | 1011 |
|
| 1012 | + it("should not dismiss any panel if codehints are visible", async function () { |
| 1013 | + panel1.show(); |
| 1014 | + panel2.hide(); |
| 1015 | + expect(panel1.isVisible()).toBeTrue(); |
| 1016 | + |
| 1017 | + expect(MainViewManager.getActivePaneId()).toEqual("first-pane"); |
| 1018 | + promise = MainViewManager._open(MainViewManager.FIRST_PANE, FileSystem.getFileForPath(testPath + "/test.js")); |
| 1019 | + await awaitsForDone(promise, "MainViewManager.doOpen"); |
| 1020 | + let editor = EditorManager.getActiveEditor(); |
| 1021 | + editor.setCursorPos(0, 0); |
| 1022 | + await awaitsForDone(CommandManager.execute(Commands.SHOW_CODE_HINTS)); |
| 1023 | + await awaitsFor(function () { |
| 1024 | + return testWindow.$(".codehint-menu").is(":visible"); |
| 1025 | + }, "codehints to be shown"); |
| 1026 | + |
| 1027 | + SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_ESCAPE, "keydown", _$("#editor-holder")[0]); |
| 1028 | + await awaitsFor(function () { |
| 1029 | + return !testWindow.$(".codehint-menu").is(":visible"); |
| 1030 | + }, "codehints to be dismissed on escape press"); |
| 1031 | + expect(panel1.isVisible()).toBeTrue(); |
| 1032 | + }); |
| 1033 | + |
1012 | 1034 | it("should escape close bottom panel one by one", async function () { |
1013 | 1035 | panel1.show(); |
1014 | 1036 | expect(panel1.isVisible()).toBeTrue(); |
|
0 commit comments