@theia/playwright 1.46.1 → 1.47.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/lib/index.js +31 -40
- package/lib/index.js.map +1 -1
- package/lib/tests/theia-application-shell.test.d.ts +2 -0
- package/lib/tests/theia-application-shell.test.d.ts.map +1 -0
- package/lib/tests/theia-application-shell.test.js +58 -0
- package/lib/tests/theia-application-shell.test.js.map +1 -0
- package/lib/theia-welcome-view.d.ts +6 -0
- package/lib/theia-welcome-view.d.ts.map +1 -0
- package/lib/theia-welcome-view.js +31 -0
- package/lib/theia-welcome-view.js.map +1 -0
- package/package.json +2 -2
- package/src/tests/theia-application-shell.test.ts +67 -0
- package/src/theia-welcome-view.ts +31 -0
package/lib/index.js
CHANGED
|
@@ -14,45 +14,36 @@
|
|
|
14
14
|
//
|
|
15
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
-
};
|
|
27
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
|
|
29
|
-
__exportStar(require("./theia-
|
|
30
|
-
__exportStar(require("./theia-app
|
|
31
|
-
__exportStar(require("./theia-
|
|
32
|
-
__exportStar(require("./theia-
|
|
33
|
-
__exportStar(require("./theia-
|
|
34
|
-
__exportStar(require("./theia-
|
|
35
|
-
__exportStar(require("./theia-
|
|
36
|
-
__exportStar(require("./theia-menu
|
|
37
|
-
__exportStar(require("./theia-menu"), exports);
|
|
38
|
-
__exportStar(require("./theia-
|
|
39
|
-
__exportStar(require("./theia-notification-
|
|
40
|
-
__exportStar(require("./theia-
|
|
41
|
-
__exportStar(require("./theia-output-
|
|
42
|
-
__exportStar(require("./theia-
|
|
43
|
-
__exportStar(require("./theia-
|
|
44
|
-
__exportStar(require("./theia-
|
|
45
|
-
__exportStar(require("./theia-problem-
|
|
46
|
-
__exportStar(require("./theia-
|
|
47
|
-
__exportStar(require("./theia-
|
|
48
|
-
__exportStar(require("./theia-
|
|
49
|
-
__exportStar(require("./theia-status-
|
|
50
|
-
__exportStar(require("./theia-
|
|
51
|
-
__exportStar(require("./theia-
|
|
52
|
-
__exportStar(require("./theia-
|
|
53
|
-
__exportStar(require("./theia-toolbar
|
|
54
|
-
__exportStar(require("./theia-
|
|
55
|
-
__exportStar(require("./theia-
|
|
56
|
-
__exportStar(require("./theia-
|
|
57
|
-
__exportStar(require("./
|
|
18
|
+
const tslib_1 = require("tslib");
|
|
19
|
+
(0, tslib_1.__exportStar)(require("./theia-about-dialog"), exports);
|
|
20
|
+
(0, tslib_1.__exportStar)(require("./theia-app"), exports);
|
|
21
|
+
(0, tslib_1.__exportStar)(require("./theia-app-loader"), exports);
|
|
22
|
+
(0, tslib_1.__exportStar)(require("./theia-context-menu"), exports);
|
|
23
|
+
(0, tslib_1.__exportStar)(require("./theia-dialog"), exports);
|
|
24
|
+
(0, tslib_1.__exportStar)(require("./theia-editor"), exports);
|
|
25
|
+
(0, tslib_1.__exportStar)(require("./theia-explorer-view"), exports);
|
|
26
|
+
(0, tslib_1.__exportStar)(require("./theia-main-menu"), exports);
|
|
27
|
+
(0, tslib_1.__exportStar)(require("./theia-menu-item"), exports);
|
|
28
|
+
(0, tslib_1.__exportStar)(require("./theia-menu"), exports);
|
|
29
|
+
(0, tslib_1.__exportStar)(require("./theia-notification-indicator"), exports);
|
|
30
|
+
(0, tslib_1.__exportStar)(require("./theia-notification-overlay"), exports);
|
|
31
|
+
(0, tslib_1.__exportStar)(require("./theia-output-channel"), exports);
|
|
32
|
+
(0, tslib_1.__exportStar)(require("./theia-output-view"), exports);
|
|
33
|
+
(0, tslib_1.__exportStar)(require("./theia-page-object"), exports);
|
|
34
|
+
(0, tslib_1.__exportStar)(require("./theia-preference-view"), exports);
|
|
35
|
+
(0, tslib_1.__exportStar)(require("./theia-problem-indicator"), exports);
|
|
36
|
+
(0, tslib_1.__exportStar)(require("./theia-problem-view"), exports);
|
|
37
|
+
(0, tslib_1.__exportStar)(require("./theia-quick-command-palette"), exports);
|
|
38
|
+
(0, tslib_1.__exportStar)(require("./theia-rename-dialog"), exports);
|
|
39
|
+
(0, tslib_1.__exportStar)(require("./theia-status-bar"), exports);
|
|
40
|
+
(0, tslib_1.__exportStar)(require("./theia-status-indicator"), exports);
|
|
41
|
+
(0, tslib_1.__exportStar)(require("./theia-text-editor"), exports);
|
|
42
|
+
(0, tslib_1.__exportStar)(require("./theia-toggle-bottom-indicator"), exports);
|
|
43
|
+
(0, tslib_1.__exportStar)(require("./theia-toolbar"), exports);
|
|
44
|
+
(0, tslib_1.__exportStar)(require("./theia-toolbar-item"), exports);
|
|
45
|
+
(0, tslib_1.__exportStar)(require("./theia-tree-node"), exports);
|
|
46
|
+
(0, tslib_1.__exportStar)(require("./theia-view"), exports);
|
|
47
|
+
(0, tslib_1.__exportStar)(require("./theia-workspace"), exports);
|
|
48
|
+
(0, tslib_1.__exportStar)(require("./util"), exports);
|
|
58
49
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,oEAAqC;AACrC,2DAA4B;AAC5B,kEAAmC;AACnC,oEAAqC;AACrC,8DAA+B;AAC/B,8DAA+B;AAC/B,qEAAsC;AACtC,iEAAkC;AAClC,iEAAkC;AAClC,4DAA6B;AAC7B,8EAA+C;AAC/C,4EAA6C;AAC7C,sEAAuC;AACvC,mEAAoC;AACpC,mEAAoC;AACpC,uEAAwC;AACxC,yEAA0C;AAC1C,oEAAqC;AACrC,6EAA8C;AAC9C,qEAAsC;AACtC,kEAAmC;AACnC,wEAAyC;AACzC,mEAAoC;AACpC,+EAAgD;AAChD,+DAAgC;AAChC,oEAAqC;AACrC,iEAAkC;AAClC,4DAA6B;AAC7B,iEAAkC;AAClC,sDAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theia-application-shell.test.d.ts","sourceRoot":"","sources":["../../src/tests/theia-application-shell.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2023 Toro Cloud Pty Ltd and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
const test_1 = require("@playwright/test");
|
|
18
|
+
const theia_app_loader_1 = require("../theia-app-loader");
|
|
19
|
+
const theia_explorer_view_1 = require("../theia-explorer-view");
|
|
20
|
+
const theia_text_editor_1 = require("../theia-text-editor");
|
|
21
|
+
const theia_welcome_view_1 = require("../theia-welcome-view");
|
|
22
|
+
const theia_workspace_1 = require("../theia-workspace");
|
|
23
|
+
test_1.test.describe('Theia Application Shell', () => {
|
|
24
|
+
test_1.test.describe.configure({
|
|
25
|
+
timeout: 120000
|
|
26
|
+
});
|
|
27
|
+
let app;
|
|
28
|
+
test_1.test.beforeAll(async ({ playwright, browser }) => {
|
|
29
|
+
const ws = new theia_workspace_1.TheiaWorkspace(['src/tests/resources/sample-files1']);
|
|
30
|
+
app = await theia_app_loader_1.TheiaAppLoader.load({ playwright, browser }, ws);
|
|
31
|
+
// The welcome view must be closed because the memory leak only occurs when there are
|
|
32
|
+
// no tabs left open.
|
|
33
|
+
const welcomeView = new theia_welcome_view_1.TheiaWelcomeView(app);
|
|
34
|
+
if (await welcomeView.isTabVisible()) {
|
|
35
|
+
await welcomeView.close();
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
test_1.test.afterAll(async () => {
|
|
39
|
+
await app.page.close();
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* The aim of this test is to detect memory leaks when opening and closing editors many times.
|
|
43
|
+
* Remove the skip and run the test, check the logs for any memory leak warnings.
|
|
44
|
+
* It should take less than 2min to run, if it takes longer than that, just increase the timeout.
|
|
45
|
+
*/
|
|
46
|
+
test_1.test.skip('should open and close a text editor many times', async () => {
|
|
47
|
+
for (let i = 0; i < 200; i++) {
|
|
48
|
+
const explorer = await app.openView(theia_explorer_view_1.TheiaExplorerView);
|
|
49
|
+
const fileStatNode = await explorer.getFileStatNodeByLabel('sample.txt');
|
|
50
|
+
const contextMenu = await fileStatNode.openContextMenu();
|
|
51
|
+
await contextMenu.clickMenuItem('Open');
|
|
52
|
+
const textEditor = new theia_text_editor_1.TheiaTextEditor('sample.txt', app);
|
|
53
|
+
await textEditor.waitForVisible();
|
|
54
|
+
await textEditor.close();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=theia-application-shell.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theia-application-shell.test.js","sourceRoot":"","sources":["../../src/tests/theia-application-shell.test.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;;AAEhF,2CAAwC;AAExC,0DAAqD;AACrD,gEAA2D;AAC3D,4DAAuD;AACvD,8DAAyD;AACzD,wDAAoD;AAEpD,WAAI,CAAC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IAC1C,WAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QACpB,OAAO,EAAE,MAAM;KAClB,CAAC,CAAC;IAEH,IAAI,GAAa,CAAC;IAElB,WAAI,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7C,MAAM,EAAE,GAAG,IAAI,gCAAc,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC;QACrE,GAAG,GAAG,MAAM,iCAAc,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QAE7D,qFAAqF;QACrF,qBAAqB;QACrB,MAAM,WAAW,GAAG,IAAI,qCAAgB,CAAC,GAAG,CAAC,CAAC;QAE9C,IAAI,MAAM,WAAW,CAAC,YAAY,EAAE,EAAE;YAClC,MAAM,WAAW,CAAC,KAAK,EAAE,CAAC;SAC7B;IACL,CAAC,CAAC,CAAC;IAEH,WAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;QACrB,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH;;;;OAIG;IACH,WAAI,CAAC,IAAI,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QACnE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YAC1B,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,uCAAiB,CAAC,CAAC;YAEvD,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAAC;YACzE,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAC;YACzD,MAAM,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAExC,MAAM,UAAU,GAAG,IAAI,mCAAe,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;YAC1D,MAAM,UAAU,CAAC,cAAc,EAAE,CAAC;YAElC,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC;SAC5B;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theia-welcome-view.d.ts","sourceRoot":"","sources":["../src/theia-welcome-view.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzC,qBAAa,gBAAiB,SAAQ,SAAS;gBAE/B,GAAG,EAAE,QAAQ;CAG5B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2023 Toro Cloud Pty Ltd and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.TheiaWelcomeView = void 0;
|
|
18
|
+
const theia_view_1 = require("./theia-view");
|
|
19
|
+
const util_1 = require("./util");
|
|
20
|
+
const TheiaWelcomeViewData = {
|
|
21
|
+
tabSelector: (0, util_1.normalizeId)('#shell-tab-getting.started.widget'),
|
|
22
|
+
viewSelector: (0, util_1.normalizeId)('#getting.started.widget'),
|
|
23
|
+
viewName: 'Welcome'
|
|
24
|
+
};
|
|
25
|
+
class TheiaWelcomeView extends theia_view_1.TheiaView {
|
|
26
|
+
constructor(app) {
|
|
27
|
+
super(TheiaWelcomeViewData, app);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.TheiaWelcomeView = TheiaWelcomeView;
|
|
31
|
+
//# sourceMappingURL=theia-welcome-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theia-welcome-view.js","sourceRoot":"","sources":["../src/theia-welcome-view.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;;;AAGhF,6CAAyC;AACzC,iCAAqC;AAErC,MAAM,oBAAoB,GAAG;IACzB,WAAW,EAAE,IAAA,kBAAW,EAAC,mCAAmC,CAAC;IAC7D,YAAY,EAAE,IAAA,kBAAW,EAAC,yBAAyB,CAAC;IACpD,QAAQ,EAAE,SAAS;CACtB,CAAC;AAEF,MAAa,gBAAiB,SAAQ,sBAAS;IAE3C,YAAY,GAAa;QACrB,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IACrC,CAAC;CACJ;AALD,4CAKC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/playwright",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.0",
|
|
4
4
|
"description": "System tests for Theia",
|
|
5
5
|
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"main": "lib/index",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "96685e37b5450a599370355ccffd4062cf1b72ab"
|
|
49
49
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2023 Toro Cloud Pty Ltd 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
|
+
import { test } from '@playwright/test';
|
|
17
|
+
import { TheiaApp } from '../theia-app';
|
|
18
|
+
import { TheiaAppLoader } from '../theia-app-loader';
|
|
19
|
+
import { TheiaExplorerView } from '../theia-explorer-view';
|
|
20
|
+
import { TheiaTextEditor } from '../theia-text-editor';
|
|
21
|
+
import { TheiaWelcomeView } from '../theia-welcome-view';
|
|
22
|
+
import { TheiaWorkspace } from '../theia-workspace';
|
|
23
|
+
|
|
24
|
+
test.describe('Theia Application Shell', () => {
|
|
25
|
+
test.describe.configure({
|
|
26
|
+
timeout: 120000
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
let app: TheiaApp;
|
|
30
|
+
|
|
31
|
+
test.beforeAll(async ({ playwright, browser }) => {
|
|
32
|
+
const ws = new TheiaWorkspace(['src/tests/resources/sample-files1']);
|
|
33
|
+
app = await TheiaAppLoader.load({ playwright, browser }, ws);
|
|
34
|
+
|
|
35
|
+
// The welcome view must be closed because the memory leak only occurs when there are
|
|
36
|
+
// no tabs left open.
|
|
37
|
+
const welcomeView = new TheiaWelcomeView(app);
|
|
38
|
+
|
|
39
|
+
if (await welcomeView.isTabVisible()) {
|
|
40
|
+
await welcomeView.close();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test.afterAll(async () => {
|
|
45
|
+
await app.page.close();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The aim of this test is to detect memory leaks when opening and closing editors many times.
|
|
50
|
+
* Remove the skip and run the test, check the logs for any memory leak warnings.
|
|
51
|
+
* It should take less than 2min to run, if it takes longer than that, just increase the timeout.
|
|
52
|
+
*/
|
|
53
|
+
test.skip('should open and close a text editor many times', async () => {
|
|
54
|
+
for (let i = 0; i < 200; i++) {
|
|
55
|
+
const explorer = await app.openView(TheiaExplorerView);
|
|
56
|
+
|
|
57
|
+
const fileStatNode = await explorer.getFileStatNodeByLabel('sample.txt');
|
|
58
|
+
const contextMenu = await fileStatNode.openContextMenu();
|
|
59
|
+
await contextMenu.clickMenuItem('Open');
|
|
60
|
+
|
|
61
|
+
const textEditor = new TheiaTextEditor('sample.txt', app);
|
|
62
|
+
await textEditor.waitForVisible();
|
|
63
|
+
|
|
64
|
+
await textEditor.close();
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2023 Toro Cloud Pty Ltd 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
|
+
import { TheiaApp } from './theia-app';
|
|
17
|
+
import { TheiaView } from './theia-view';
|
|
18
|
+
import { normalizeId } from './util';
|
|
19
|
+
|
|
20
|
+
const TheiaWelcomeViewData = {
|
|
21
|
+
tabSelector: normalizeId('#shell-tab-getting.started.widget'),
|
|
22
|
+
viewSelector: normalizeId('#getting.started.widget'),
|
|
23
|
+
viewName: 'Welcome'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export class TheiaWelcomeView extends TheiaView {
|
|
27
|
+
|
|
28
|
+
constructor(app: TheiaApp) {
|
|
29
|
+
super(TheiaWelcomeViewData, app);
|
|
30
|
+
}
|
|
31
|
+
}
|