@theia/api-tests 1.37.0-next.21 → 1.37.0-next.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/monaco-api.spec.js +18 -1
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/api-tests",
|
|
3
|
-
"version": "1.37.0-next.
|
|
3
|
+
"version": "1.37.0-next.29+53b3841a9",
|
|
4
4
|
"description": "Theia API tests",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.37.0-next.
|
|
6
|
+
"@theia/core": "1.37.0-next.29+53b3841a9"
|
|
7
7
|
},
|
|
8
8
|
"license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
|
|
9
9
|
"repository": {
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "53b3841a910f05937c6f18cbeb61395dd893ded4"
|
|
24
24
|
}
|
package/src/monaco-api.spec.js
CHANGED
|
@@ -32,7 +32,8 @@ describe('Monaco API', async function () {
|
|
|
32
32
|
const { TokenizationRegistry } = require('@theia/monaco-editor-core/esm/vs/editor/common/languages');
|
|
33
33
|
const { MonacoContextKeyService } = require('@theia/monaco/lib/browser/monaco-context-key-service');
|
|
34
34
|
const { URI } = require('@theia/monaco-editor-core/esm/vs/base/common/uri');
|
|
35
|
-
|
|
35
|
+
const { animationFrame } = require('@theia/core/lib/browser/browser');
|
|
36
|
+
|
|
36
37
|
const container = window.theia.container;
|
|
37
38
|
const editorManager = container.get(EditorManager);
|
|
38
39
|
const workspaceService = container.get(WorkspaceService);
|
|
@@ -185,4 +186,20 @@ describe('Monaco API', async function () {
|
|
|
185
186
|
assert.isTrue(contextKeys.match(`${key} == ${secondValue}`));
|
|
186
187
|
});
|
|
187
188
|
|
|
189
|
+
it('Supports context key: inQuickOpen', async () => {
|
|
190
|
+
const inQuickOpenContextKey = 'inQuickOpen';
|
|
191
|
+
const quickOpenCommands = ['file-search.openFile', 'workbench.action.showCommands'];
|
|
192
|
+
const CommandThatChangesFocus = 'workbench.files.action.focusFilesExplorer';
|
|
193
|
+
|
|
194
|
+
for (const cmd of quickOpenCommands) {
|
|
195
|
+
assert.isFalse(contextKeys.match(inQuickOpenContextKey));
|
|
196
|
+
await commands.executeCommand(cmd);
|
|
197
|
+
assert.isTrue(contextKeys.match(inQuickOpenContextKey));
|
|
198
|
+
|
|
199
|
+
await commands.executeCommand(CommandThatChangesFocus);
|
|
200
|
+
await animationFrame();
|
|
201
|
+
assert.isFalse(contextKeys.match(inQuickOpenContextKey));
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
188
205
|
});
|