@theia/api-tests 1.70.0-next.34 → 1.70.0-next.51

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.70.0-next.34+86ff81264",
3
+ "version": "1.70.0-next.51+d3b790785",
4
4
  "description": "Theia API tests",
5
5
  "dependencies": {
6
- "@theia/core": "1.70.0-next.34+86ff81264"
6
+ "@theia/core": "1.70.0-next.51+d3b790785"
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": "86ff81264416872843cdfca6aebb2bd855e2ab6a"
23
+ "gitHead": "d3b790785711d8546ee321ede37d04fdb2b6b6d3"
24
24
  }
@@ -14,14 +14,13 @@
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
- const { IOpenerService } = require('@theia/monaco-editor-core/esm/vs/platform/opener/common/opener');
19
-
20
17
  // @ts-check
21
18
  describe('Monaco API', async function () {
22
19
  this.timeout(5000);
23
20
 
24
21
  const { assert } = chai;
22
+ const { timeout } = require('@theia/core/lib/common/promise-util');
23
+ const { IOpenerService } = require('@theia/monaco-editor-core/esm/vs/platform/opener/common/opener');
25
24
 
26
25
  const { EditorManager } = require('@theia/editor/lib/browser/editor-manager');
27
26
  const { WorkspaceService } = require('@theia/workspace/lib/browser/workspace-service');
@@ -40,8 +40,21 @@ describe('Navigator', function () {
40
40
  await fileService.createFolder(targetUri);
41
41
  });
42
42
 
43
- afterEach(async () => {
44
- await fileService.delete(targetUri.parent, { fromUserGesture: false, useTrash: false, recursive: true });
43
+ afterEach(async function () {
44
+ // On Windows, file handles may not be released immediately after move/copy operations,
45
+ // causing EBUSY errors on cleanup. Retry with a short delay to handle this.
46
+ for (let attempt = 0; attempt < 3; attempt++) {
47
+ try {
48
+ await fileService.delete(targetUri.parent, { fromUserGesture: false, useTrash: false, recursive: true });
49
+ return;
50
+ } catch (e) {
51
+ if (attempt < 2) {
52
+ await new Promise(resolve => setTimeout(resolve, 500));
53
+ } else {
54
+ throw e;
55
+ }
56
+ }
57
+ }
45
58
  });
46
59
 
47
60
  /** @type {Array<['copy' | 'move', boolean]>} */
package/src/scm.spec.js CHANGED
@@ -14,12 +14,11 @@
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
-
19
17
  // @ts-check
20
18
  describe('SCM', function () {
21
19
 
22
20
  const { assert } = chai;
21
+ const { timeout } = require('@theia/core/lib/common/promise-util');
23
22
 
24
23
  const { HostedPluginSupport } = require('@theia/plugin-ext/lib/hosted/browser/hosted-plugin');
25
24
  const Uri = require('@theia/core/lib/common/uri');
@@ -108,33 +107,13 @@ describe('SCM', function () {
108
107
  assert.isTrue(scmWidget.resourceWidget.isVisible);
109
108
  });
110
109
 
111
- it('the view should not display the resource tree when no repository is present', () => {
110
+ it('the view should remain visible when no repository is present (shows welcome content)', () => {
112
111
 
113
112
  // Store the current selected repository so it can be restored.
114
113
  const cachedSelectedRepository = scmService.selectedRepository;
115
114
 
116
115
  scmService.selectedRepository = undefined;
117
- assert.isFalse(scmWidget.resourceWidget.isVisible);
118
-
119
- // Restore the selected repository.
120
- scmService.selectedRepository = cachedSelectedRepository;
121
- });
122
-
123
- });
124
-
125
- describe('\'ScmNoRepositoryWidget\'', () => {
126
-
127
- it('should not be visible when a repository is present', () => {
128
- assert.isFalse(scmWidget.noRepositoryWidget.isVisible);
129
- });
130
-
131
- it('should be visible when no repository is present', () => {
132
-
133
- // Store the current selected repository so it can be restored.
134
- const cachedSelectedRepository = scmService.selectedRepository;
135
-
136
- scmService.selectedRepository = undefined;
137
- assert.isTrue(scmWidget.noRepositoryWidget.isVisible);
116
+ assert.isTrue(scmWidget.resourceWidget.isVisible);
138
117
 
139
118
  // Restore the selected repository.
140
119
  scmService.selectedRepository = cachedSelectedRepository;