@theia/api-tests 1.66.0-next.44 → 1.66.0-next.73
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.66.0-next.
|
|
3
|
+
"version": "1.66.0-next.73+6d82794da",
|
|
4
4
|
"description": "Theia API tests",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.66.0-next.
|
|
6
|
+
"@theia/core": "1.66.0-next.73+6d82794da"
|
|
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": "6d82794da24e16f75d70eaac3a4178a29e822e82"
|
|
24
24
|
}
|
|
@@ -40,4 +40,37 @@ describe('CredentialsService', function () {
|
|
|
40
40
|
assert.strictEqual(storedPassword, password);
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
+
it('can retrieve all account keys for a service', async function () {
|
|
44
|
+
// Initially, there should be no keys for the service
|
|
45
|
+
let keys = await credentials.keys(serviceName);
|
|
46
|
+
assert.strictEqual(keys.length, 0);
|
|
47
|
+
|
|
48
|
+
// Add a single credential
|
|
49
|
+
await credentials.setPassword(serviceName, accountName, password);
|
|
50
|
+
keys = await credentials.keys(serviceName);
|
|
51
|
+
assert.strictEqual(keys.length, 1);
|
|
52
|
+
assert.include(keys, accountName);
|
|
53
|
+
|
|
54
|
+
// Add more credentials with different account names
|
|
55
|
+
const accountName2 = 'test-account-2';
|
|
56
|
+
const accountName3 = 'test-account-3';
|
|
57
|
+
await credentials.setPassword(serviceName, accountName2, 'password2');
|
|
58
|
+
await credentials.setPassword(serviceName, accountName3, 'password3');
|
|
59
|
+
|
|
60
|
+
keys = await credentials.keys(serviceName);
|
|
61
|
+
assert.strictEqual(keys.length, 3);
|
|
62
|
+
assert.include(keys, accountName);
|
|
63
|
+
assert.include(keys, accountName2);
|
|
64
|
+
assert.include(keys, accountName3);
|
|
65
|
+
|
|
66
|
+
// Clean up all accounts
|
|
67
|
+
await credentials.deletePassword(serviceName, accountName);
|
|
68
|
+
await credentials.deletePassword(serviceName, accountName2);
|
|
69
|
+
await credentials.deletePassword(serviceName, accountName3);
|
|
70
|
+
|
|
71
|
+
// Verify keys are removed after deletion
|
|
72
|
+
keys = await credentials.keys(serviceName);
|
|
73
|
+
assert.strictEqual(keys.length, 0);
|
|
74
|
+
});
|
|
75
|
+
|
|
43
76
|
});
|