@theia/playwright 1.45.1 → 1.46.0-next.106

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 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
- __exportStar(require("./theia-about-dialog"), exports);
29
- __exportStar(require("./theia-app"), exports);
30
- __exportStar(require("./theia-app-loader"), exports);
31
- __exportStar(require("./theia-context-menu"), exports);
32
- __exportStar(require("./theia-dialog"), exports);
33
- __exportStar(require("./theia-editor"), exports);
34
- __exportStar(require("./theia-explorer-view"), exports);
35
- __exportStar(require("./theia-main-menu"), exports);
36
- __exportStar(require("./theia-menu-item"), exports);
37
- __exportStar(require("./theia-menu"), exports);
38
- __exportStar(require("./theia-notification-indicator"), exports);
39
- __exportStar(require("./theia-notification-overlay"), exports);
40
- __exportStar(require("./theia-output-channel"), exports);
41
- __exportStar(require("./theia-output-view"), exports);
42
- __exportStar(require("./theia-page-object"), exports);
43
- __exportStar(require("./theia-preference-view"), exports);
44
- __exportStar(require("./theia-problem-indicator"), exports);
45
- __exportStar(require("./theia-problem-view"), exports);
46
- __exportStar(require("./theia-quick-command-palette"), exports);
47
- __exportStar(require("./theia-rename-dialog"), exports);
48
- __exportStar(require("./theia-status-bar"), exports);
49
- __exportStar(require("./theia-status-indicator"), exports);
50
- __exportStar(require("./theia-text-editor"), exports);
51
- __exportStar(require("./theia-toggle-bottom-indicator"), exports);
52
- __exportStar(require("./theia-toolbar"), exports);
53
- __exportStar(require("./theia-toolbar-item"), exports);
54
- __exportStar(require("./theia-tree-node"), exports);
55
- __exportStar(require("./theia-view"), exports);
56
- __exportStar(require("./theia-workspace"), exports);
57
- __exportStar(require("./util"), exports);
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;;;;;;;;;;;;AAEhF,uDAAqC;AACrC,8CAA4B;AAC5B,qDAAmC;AACnC,uDAAqC;AACrC,iDAA+B;AAC/B,iDAA+B;AAC/B,wDAAsC;AACtC,oDAAkC;AAClC,oDAAkC;AAClC,+CAA6B;AAC7B,iEAA+C;AAC/C,+DAA6C;AAC7C,yDAAuC;AACvC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,4DAA0C;AAC1C,uDAAqC;AACrC,gEAA8C;AAC9C,wDAAsC;AACtC,qDAAmC;AACnC,2DAAyC;AACzC,sDAAoC;AACpC,kEAAgD;AAChD,kDAAgC;AAChC,uDAAqC;AACrC,oDAAkC;AAClC,+CAA6B;AAC7B,oDAAkC;AAClC,yCAAuB"}
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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=theia-application-shell.test.d.ts.map
@@ -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":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E;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"}
@@ -1 +1 @@
1
- {"version":3,"file":"theia-quick-command-palette.d.ts","sourceRoot":"","sources":["../src/theia-quick-command-palette.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,qBAAa,wBAAyB,SAAQ,eAAe;IAEzD,QAAQ,SAAyB;IAE3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAS1B,OAAO,CAAC,GAAG,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;cAMtC,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYlE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;cAczC,eAAe,IAAI,OAAO,CAAC,aAAa,CAAC,UAAU,GAAG,WAAW,CAAC,GAAG,IAAI,CAAC;CAO7F"}
1
+ {"version":3,"file":"theia-quick-command-palette.d.ts","sourceRoot":"","sources":["../src/theia-quick-command-palette.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,qBAAa,wBAAyB,SAAQ,eAAe;IAEzD,QAAQ,SAAyB;IAE3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAS1B,OAAO,CAAC,GAAG,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;cAMtC,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYlE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;cAYzC,eAAe,IAAI,OAAO,CAAC,aAAa,CAAC,UAAU,GAAG,WAAW,CAAC,GAAG,IAAI,CAAC;CAO7F"}
@@ -60,13 +60,11 @@ class TheiaQuickCommandPalette extends theia_page_object_1.TheiaPageObject {
60
60
  if (!await this.isOpen()) {
61
61
  this.open();
62
62
  }
63
- const input = await this.page.waitForSelector(`${this.selector} .monaco-inputbox .input`);
64
- if (input != null) {
65
- await input.focus();
66
- await input.type(value, { delay: util_1.USER_KEY_TYPING_DELAY });
67
- if (confirm) {
68
- await this.page.keyboard.press('Enter');
69
- }
63
+ const input = this.page.locator(`${this.selector} .monaco-inputbox .input`);
64
+ await input.focus();
65
+ await input.pressSequentially(value, { delay: util_1.USER_KEY_TYPING_DELAY });
66
+ if (confirm) {
67
+ await this.page.keyboard.press('Enter');
70
68
  }
71
69
  }
72
70
  async selectedCommand() {
@@ -1 +1 @@
1
- {"version":3,"file":"theia-quick-command-palette.js","sourceRoot":"","sources":["../src/theia-quick-command-palette.ts"],"names":[],"mappings":";AAAA,gFAA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AAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAC3C;IACL,CAAC;IAES,KAAK,CAAC,eAAe;QAC3B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/D,IAAI,CAAC,OAAO,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;SACjD;QACD,OAAO,OAAO,CAAC,CAAC,CAAC,oDAAoD,CAAC,CAAC;IAC3E,CAAC;CACJ;AA5DD,4DA4DC"}
@@ -1 +1 @@
1
- {"version":3,"file":"theia-rename-dialog.d.ts","sourceRoot":"","sources":["../src/theia-rename-dialog.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,qBAAa,iBAAkB,SAAQ,WAAW;IAExC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO5C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAOjC"}
1
+ {"version":3,"file":"theia-rename-dialog.d.ts","sourceRoot":"","sources":["../src/theia-rename-dialog.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,qBAAa,iBAAkB,SAAQ,WAAW;IAExC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM5C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAOjC"}
@@ -20,10 +20,9 @@ const theia_dialog_1 = require("./theia-dialog");
20
20
  const util_1 = require("./util");
21
21
  class TheiaRenameDialog extends theia_dialog_1.TheiaDialog {
22
22
  async enterNewName(newName) {
23
- const inputField = await this.page.waitForSelector(`${this.blockSelector} .theia-input`);
24
- await inputField.press(util_1.OSUtil.isMacOS ? 'Meta+a' : 'Control+a');
25
- await inputField.type(newName, { delay: util_1.USER_KEY_TYPING_DELAY });
26
- await this.page.waitForTimeout(util_1.USER_KEY_TYPING_DELAY);
23
+ const inputField = this.page.locator(`${this.blockSelector} .theia-input`);
24
+ await inputField.selectText();
25
+ await inputField.pressSequentially(newName, { delay: util_1.USER_KEY_TYPING_DELAY });
27
26
  }
28
27
  async confirm() {
29
28
  if (!await this.validationResult()) {
@@ -1 +1 @@
1
- {"version":3,"file":"theia-rename-dialog.js","sourceRoot":"","sources":["../src/theia-rename-dialog.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+DAA+D;AAC/D,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,iDAA6C;AAC7C,iCAAuD;AAEvD,MAAa,iBAAkB,SAAQ,0BAAW;IAE9C,KAAK,CAAC,YAAY,CAAC,OAAe;QAC9B,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,eAAe,CAAC,CAAC;QACzF,MAAM,UAAU,CAAC,KAAK,CAAC,aAAM,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;QAChE,MAAM,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,4BAAqB,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,4BAAqB,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,OAAO;QACT,IAAI,CAAC,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,sDAAsD,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;SAC3G;QACD,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC;CAEJ;AAhBD,8CAgBC"}
1
+ {"version":3,"file":"theia-rename-dialog.js","sourceRoot":"","sources":["../src/theia-rename-dialog.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+DAA+D;AAC/D,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,iDAA6C;AAC7C,iCAA+C;AAE/C,MAAa,iBAAkB,SAAQ,0BAAW;IAE9C,KAAK,CAAC,YAAY,CAAC,OAAe;QAC9B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,aAAa,eAAe,CAAC,CAAC;QAC3E,MAAM,UAAU,CAAC,UAAU,EAAE,CAAC;QAC9B,MAAM,UAAU,CAAC,iBAAiB,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,4BAAqB,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,OAAO;QACT,IAAI,CAAC,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,sDAAsD,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;SAC3G;QACD,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC;CAEJ;AAfD,8CAeC"}
@@ -33,7 +33,7 @@ class TheiaTerminal extends theia_view_1.TheiaView {
33
33
  async write(text) {
34
34
  await this.activate();
35
35
  const input = await this.waitForInputArea();
36
- await input.type(text);
36
+ await input.fill(text);
37
37
  }
38
38
  async contents() {
39
39
  await this.activate();
@@ -0,0 +1,6 @@
1
+ import { TheiaApp } from './theia-app';
2
+ import { TheiaView } from './theia-view';
3
+ export declare class TheiaWelcomeView extends TheiaView {
4
+ constructor(app: TheiaApp);
5
+ }
6
+ //# sourceMappingURL=theia-welcome-view.d.ts.map
@@ -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.45.1",
3
+ "version": "1.46.0-next.106+cf038c17c",
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": "3837c50544190b80d0ad8e87aa9fa9f286c70fcc"
48
+ "gitHead": "cf038c17c3b3b210d9ae02b09d64921f639247f9"
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
+ });
@@ -63,13 +63,11 @@ export class TheiaQuickCommandPalette extends TheiaPageObject {
63
63
  if (!await this.isOpen()) {
64
64
  this.open();
65
65
  }
66
- const input = await this.page.waitForSelector(`${this.selector} .monaco-inputbox .input`);
67
- if (input != null) {
68
- await input.focus();
69
- await input.type(value, { delay: USER_KEY_TYPING_DELAY });
70
- if (confirm) {
71
- await this.page.keyboard.press('Enter');
72
- }
66
+ const input = this.page.locator(`${this.selector} .monaco-inputbox .input`);
67
+ await input.focus();
68
+ await input.pressSequentially(value, { delay: USER_KEY_TYPING_DELAY });
69
+ if (confirm) {
70
+ await this.page.keyboard.press('Enter');
73
71
  }
74
72
  }
75
73
 
@@ -15,15 +15,14 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { TheiaDialog } from './theia-dialog';
18
- import { OSUtil, USER_KEY_TYPING_DELAY } from './util';
18
+ import { USER_KEY_TYPING_DELAY } from './util';
19
19
 
20
20
  export class TheiaRenameDialog extends TheiaDialog {
21
21
 
22
22
  async enterNewName(newName: string): Promise<void> {
23
- const inputField = await this.page.waitForSelector(`${this.blockSelector} .theia-input`);
24
- await inputField.press(OSUtil.isMacOS ? 'Meta+a' : 'Control+a');
25
- await inputField.type(newName, { delay: USER_KEY_TYPING_DELAY });
26
- await this.page.waitForTimeout(USER_KEY_TYPING_DELAY);
23
+ const inputField = this.page.locator(`${this.blockSelector} .theia-input`);
24
+ await inputField.selectText();
25
+ await inputField.pressSequentially(newName, { delay: USER_KEY_TYPING_DELAY });
27
26
  }
28
27
 
29
28
  async confirm(): Promise<void> {
@@ -38,7 +38,7 @@ export class TheiaTerminal extends TheiaView {
38
38
  async write(text: string): Promise<void> {
39
39
  await this.activate();
40
40
  const input = await this.waitForInputArea();
41
- await input.type(text);
41
+ await input.fill(text);
42
42
  }
43
43
 
44
44
  async contents(): Promise<string> {
@@ -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
+ }