@theia/api-tests 1.57.1 → 1.58.0
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
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/api-tests",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.0",
|
|
4
4
|
"description": "Theia API tests",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.
|
|
6
|
+
"@theia/core": "1.58.0"
|
|
7
7
|
},
|
|
8
8
|
"license": "EPL-2.0 OR GPL-2.0-only 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": "6594f32b9727aea20d88934bf386dee06d08fa5e"
|
|
24
24
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2024 TypeFox and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
// @ts-check
|
|
18
|
+
describe('CredentialsService', function () {
|
|
19
|
+
this.timeout(5000);
|
|
20
|
+
const { assert } = chai;
|
|
21
|
+
|
|
22
|
+
const { CredentialsService } = require('@theia/core/lib/browser/credentials-service');
|
|
23
|
+
|
|
24
|
+
/** @type {import('inversify').Container} */
|
|
25
|
+
const container = window['theia'].container;
|
|
26
|
+
/** @type {import('@theia/core/lib/browser/credentials-service').CredentialsService} */
|
|
27
|
+
const credentials = container.get(CredentialsService);
|
|
28
|
+
|
|
29
|
+
const serviceName = 'theia-test';
|
|
30
|
+
const accountName = 'test-account';
|
|
31
|
+
const password = 'test-password';
|
|
32
|
+
|
|
33
|
+
this.beforeEach(async () => {
|
|
34
|
+
await credentials.deletePassword(serviceName, accountName);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('can set and retrieve stored credentials', async function () {
|
|
38
|
+
await credentials.setPassword(serviceName, accountName, password);
|
|
39
|
+
const storedPassword = await credentials.getPassword(serviceName, accountName);
|
|
40
|
+
assert.strictEqual(storedPassword, password);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
});
|
package/src/monaco-api.spec.js
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
+
const { IOpenerService } = require('@theia/monaco-editor-core/esm/vs/platform/opener/common/opener');
|
|
18
|
+
|
|
17
19
|
// @ts-check
|
|
18
20
|
describe('Monaco API', async function () {
|
|
19
21
|
this.timeout(5000);
|
|
@@ -149,14 +151,8 @@ describe('Monaco API', async function () {
|
|
|
149
151
|
});
|
|
150
152
|
|
|
151
153
|
it('OpenerService.open', async () => {
|
|
152
|
-
const hoverContribution = monacoEditor.getControl().getContribution('editor.contrib.hover');
|
|
153
|
-
assert.isDefined(hoverContribution);
|
|
154
|
-
if (!('_openerService' in hoverContribution)) {
|
|
155
|
-
assert.fail('hoverContribution does not have OpenerService');
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
154
|
/** @type {import('@theia/monaco-editor-core/esm/vs/editor/browser/services/openerService').OpenerService} */
|
|
159
|
-
const openerService =
|
|
155
|
+
const openerService = StandaloneServices.get(IOpenerService);
|
|
160
156
|
|
|
161
157
|
let opened = false;
|
|
162
158
|
const id = '__test:OpenerService.open';
|