@theia/api-tests 1.51.0 → 1.52.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 +3 -3
- package/src/views.spec.js +8 -4
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/api-tests",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.52.0",
|
|
4
4
|
"description": "Theia API tests",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.
|
|
6
|
+
"@theia/core": "1.52.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": "40ceebcd4ee75f13ec16b9dc7314e9384493c1ac"
|
|
24
24
|
}
|
package/src/views.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 { timeout } = require('@theia/core/lib/common/promise-util');
|
|
18
|
+
|
|
17
19
|
// @ts-check
|
|
18
20
|
describe('Views', function () {
|
|
19
21
|
this.timeout(7500);
|
|
@@ -52,24 +54,26 @@ describe('Views', function () {
|
|
|
52
54
|
if (view) {
|
|
53
55
|
assert.notEqual(shell.getAreaFor(view), contribution.defaultViewOptions.area);
|
|
54
56
|
assert.isFalse(view.isVisible);
|
|
55
|
-
assert.
|
|
57
|
+
assert.isTrue(view !== shell.activeWidget, `${contribution.viewLabel} !== shell.activeWidget`);
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
view = await contribution.toggleView();
|
|
59
|
-
|
|
61
|
+
// we can't use "equals" here because Mocha chokes on the diff for certain widgets
|
|
62
|
+
assert.isTrue(view !== undefined, `${contribution.viewLabel} !== undefined`);
|
|
60
63
|
assert.equal(shell.getAreaFor(view), contribution.defaultViewOptions.area);
|
|
61
64
|
assert.isDefined(shell.getTabBarFor(view));
|
|
62
65
|
// @ts-ignore
|
|
63
66
|
assert.equal(shell.getAreaFor(shell.getTabBarFor(view)), contribution.defaultViewOptions.area);
|
|
64
67
|
assert.isTrue(view.isVisible);
|
|
65
|
-
assert.
|
|
68
|
+
assert.isTrue(view === shell.activeWidget, `${contribution.viewLabel} === shell.activeWidget`);
|
|
66
69
|
|
|
67
70
|
view = await contribution.toggleView();
|
|
71
|
+
await timeout(0); // seems that the "await" is not enought to guarantee that the panel is hidden
|
|
68
72
|
assert.notEqual(view, undefined);
|
|
69
73
|
assert.equal(shell.getAreaFor(view), contribution.defaultViewOptions.area);
|
|
70
74
|
assert.isDefined(shell.getTabBarFor(view));
|
|
71
75
|
assert.isFalse(view.isVisible);
|
|
72
|
-
assert.
|
|
76
|
+
assert.isTrue(view !== shell.activeWidget, `${contribution.viewLabel} !== shell.activeWidget`);
|
|
73
77
|
});
|
|
74
78
|
}
|
|
75
79
|
|