@theia/playwright 1.34.2 → 1.34.3
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/LICENSE +641 -641
- package/README.md +54 -54
- package/lib/index.d.ts +25 -25
- package/lib/index.js +52 -52
- package/lib/tests/fixtures/theia-fixture.d.ts +3 -3
- package/lib/tests/fixtures/theia-fixture.js +23 -23
- package/lib/tests/theia-app.test.d.ts +1 -1
- package/lib/tests/theia-app.test.js +29 -29
- package/lib/tests/theia-explorer-view.test.d.ts +1 -1
- package/lib/tests/theia-explorer-view.test.js +109 -109
- package/lib/tests/theia-main-menu.test.d.ts +1 -1
- package/lib/tests/theia-main-menu.test.js +73 -73
- package/lib/tests/theia-preference-view.test.d.ts +1 -1
- package/lib/tests/theia-preference-view.test.js +99 -99
- package/lib/tests/theia-problems-view.test.d.ts +1 -1
- package/lib/tests/theia-problems-view.test.js +52 -52
- package/lib/tests/theia-quick-command.test.d.ts +1 -1
- package/lib/tests/theia-quick-command.test.js +53 -53
- package/lib/tests/theia-sample-app.test.d.ts +1 -1
- package/lib/tests/theia-sample-app.test.js +80 -80
- package/lib/tests/theia-status-bar.test.d.ts +1 -1
- package/lib/tests/theia-status-bar.test.js +41 -41
- package/lib/tests/theia-text-editor.test.d.ts +1 -1
- package/lib/tests/theia-text-editor.test.js +152 -152
- package/lib/tests/theia-workspace.test.d.ts +1 -1
- package/lib/tests/theia-workspace.test.js +47 -47
- package/lib/theia-about-dialog.d.ts +4 -4
- package/lib/theia-about-dialog.js +26 -26
- package/lib/theia-app.d.ts +43 -43
- package/lib/theia-app.js +135 -135
- package/lib/theia-context-menu.d.ts +8 -8
- package/lib/theia-context-menu.js +37 -37
- package/lib/theia-dialog.d.ts +27 -27
- package/lib/theia-dialog.js +98 -98
- package/lib/theia-editor.d.ts +9 -9
- package/lib/theia-editor.js +68 -68
- package/lib/theia-explorer-view.d.ts +38 -38
- package/lib/theia-explorer-view.js +209 -209
- package/lib/theia-main-menu.d.ts +12 -12
- package/lib/theia-main-menu.js +53 -53
- package/lib/theia-menu-item.d.ts +14 -14
- package/lib/theia-menu-item.js +66 -66
- package/lib/theia-menu.d.ts +16 -16
- package/lib/theia-menu.js +86 -86
- package/lib/theia-notification-indicator.d.ts +7 -7
- package/lib/theia-notification-indicator.js +44 -44
- package/lib/theia-notification-overlay.d.ts +22 -22
- package/lib/theia-notification-overlay.js +79 -79
- package/lib/theia-page-object.d.ts +7 -7
- package/lib/theia-page-object.js +27 -27
- package/lib/theia-preference-view.d.ts +76 -76
- package/lib/theia-preference-view.js +201 -201
- package/lib/theia-problem-indicator.d.ts +8 -8
- package/lib/theia-problem-indicator.js +38 -38
- package/lib/theia-problem-view.d.ts +5 -5
- package/lib/theia-problem-view.js +30 -30
- package/lib/theia-quick-command-palette.d.ts +11 -11
- package/lib/theia-quick-command-palette.js +73 -73
- package/lib/theia-rename-dialog.d.ts +5 -5
- package/lib/theia-rename-dialog.js +35 -35
- package/lib/theia-status-bar.d.ts +13 -13
- package/lib/theia-status-bar.js +39 -39
- package/lib/theia-status-indicator.d.ts +10 -10
- package/lib/theia-status-indicator.js +48 -48
- package/lib/theia-text-editor.d.ts +27 -27
- package/lib/theia-text-editor.js +149 -149
- package/lib/theia-toggle-bottom-indicator.d.ts +4 -4
- package/lib/theia-toggle-bottom-indicator.js +26 -26
- package/lib/theia-tree-node.d.ts +16 -16
- package/lib/theia-tree-node.js +53 -53
- package/lib/theia-view.d.ts +32 -32
- package/lib/theia-view.js +151 -151
- package/lib/theia-workspace.d.ts +18 -18
- package/lib/theia-workspace.js +69 -69
- package/lib/util.d.ts +19 -19
- package/lib/util.js +93 -93
- package/package.json +2 -2
- package/src/index.ts +41 -41
- package/src/tests/fixtures/theia-fixture.ts +25 -25
- package/src/tests/resources/sample-files1/sample.txt +4 -4
- package/src/tests/resources/sample-files1/sampleFolder/sampleFolder1/sampleFolder1-1/sampleFile1-1-1.txt +1 -1
- package/src/tests/resources/sample-files1/sampleFolder/sampleFolder1/sampleFolder1-1/sampleFile1-1-2.txt +1 -1
- package/src/tests/resources/sample-files1/sampleFolder/sampleFolder1/sampleFolder1-2/sampleFile1-2-1.txt +1 -1
- package/src/tests/resources/sample-files1/sampleFolder/sampleFolder1/sampleFolder1-2/sampleFile1-2-2.txt +1 -1
- package/src/tests/resources/sample-files1/sampleFolder/sampleFolder2/sampleFolder2-1/sampleFile2-1-1.txt +1 -1
- package/src/tests/resources/sample-files1/sampleFolder/sampleFolder2/sampleFolder2-1/sampleFile2-1-2.txt +1 -1
- package/src/tests/resources/sample-files1/sampleFolder/sampleFolder2/sampleFolder2-2/sampleFile2-2-1.txt +1 -1
- package/src/tests/resources/sample-files1/sampleFolder/sampleFolder2/sampleFolder2-2/sampleFile2-2-2.txt +1 -1
- package/src/tests/resources/sample-files2/another-sample.txt +1 -1
- package/src/tests/theia-app.test.ts +34 -34
- package/src/tests/theia-explorer-view.test.ts +124 -124
- package/src/tests/theia-main-menu.test.ts +89 -89
- package/src/tests/theia-preference-view.test.ts +118 -118
- package/src/tests/theia-problems-view.test.ts +60 -60
- package/src/tests/theia-quick-command.test.ts +61 -61
- package/src/tests/theia-sample-app.test.ts +92 -92
- package/src/tests/theia-status-bar.test.ts +47 -47
- package/src/tests/theia-text-editor.test.ts +182 -182
- package/src/tests/theia-workspace.test.ts +51 -51
- package/src/theia-about-dialog.ts +26 -26
- package/src/theia-app.ts +154 -154
- package/src/theia-context-menu.ts +42 -42
- package/src/theia-dialog.ts +113 -113
- package/src/theia-editor.ts +73 -73
- package/src/theia-explorer-view.ts +234 -234
- package/src/theia-main-menu.ts +54 -54
- package/src/theia-menu-item.ts +75 -75
- package/src/theia-menu.ts +96 -96
- package/src/theia-notification-indicator.ts +44 -44
- package/src/theia-notification-overlay.ts +94 -94
- package/src/theia-page-object.ts +29 -29
- package/src/theia-preference-view.ts +232 -232
- package/src/theia-problem-indicator.ts +37 -37
- package/src/theia-problem-view.ts +30 -30
- package/src/theia-quick-command-palette.ts +75 -75
- package/src/theia-rename-dialog.ts +36 -36
- package/src/theia-status-bar.ts +44 -44
- package/src/theia-status-indicator.ts +50 -50
- package/src/theia-text-editor.ts +172 -172
- package/src/theia-toggle-bottom-indicator.ts +21 -21
- package/src/theia-tree-node.ts +60 -60
- package/src/theia-view.ts +178 -178
- package/src/theia-workspace.ts +76 -76
- package/src/util.ts +91 -91
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2021 logi.cals GmbH, EclipseSource 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 WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const test_1 = require("@playwright/test");
|
|
19
|
-
const util_1 = require("../util");
|
|
20
|
-
const theia_app_1 = require("../theia-app");
|
|
21
|
-
const theia_fixture_1 = require("./fixtures/theia-fixture");
|
|
22
|
-
let menuBar;
|
|
23
|
-
theia_fixture_1.default.describe('Theia Main Menu', () => {
|
|
24
|
-
theia_fixture_1.default.beforeAll(async () => {
|
|
25
|
-
const app = await theia_app_1.TheiaApp.load(theia_fixture_1.page);
|
|
26
|
-
menuBar = app.menuBar;
|
|
27
|
-
});
|
|
28
|
-
(0, theia_fixture_1.default)('should show the main menu bar', async () => {
|
|
29
|
-
const menuBarItems = await menuBar.visibleMenuBarItems();
|
|
30
|
-
(0, test_1.expect)(menuBarItems).toContain('File');
|
|
31
|
-
(0, test_1.expect)(menuBarItems).toContain('Edit');
|
|
32
|
-
(0, test_1.expect)(menuBarItems).toContain('Help');
|
|
33
|
-
});
|
|
34
|
-
(0, theia_fixture_1.default)("should open main menu 'File'", async () => {
|
|
35
|
-
const mainMenu = await menuBar.openMenu('File');
|
|
36
|
-
(0, test_1.expect)(await mainMenu.isOpen()).toBe(true);
|
|
37
|
-
});
|
|
38
|
-
(0, theia_fixture_1.default)("should show the menu items 'New File' and 'New Folder'", async () => {
|
|
39
|
-
const mainMenu = await menuBar.openMenu('File');
|
|
40
|
-
const menuItems = await mainMenu.visibleMenuItems();
|
|
41
|
-
(0, test_1.expect)(menuItems).toContain('New File');
|
|
42
|
-
(0, test_1.expect)(menuItems).toContain('New Folder');
|
|
43
|
-
});
|
|
44
|
-
(0, theia_fixture_1.default)("should return menu item by name 'New File'", async () => {
|
|
45
|
-
const mainMenu = await menuBar.openMenu('File');
|
|
46
|
-
const menuItem = await mainMenu.menuItemByName('New File');
|
|
47
|
-
(0, test_1.expect)(menuItem).toBeDefined();
|
|
48
|
-
const label = await (menuItem === null || menuItem === void 0 ? void 0 : menuItem.label());
|
|
49
|
-
(0, test_1.expect)(label).toBe('New File');
|
|
50
|
-
const shortCut = await (menuItem === null || menuItem === void 0 ? void 0 : menuItem.shortCut());
|
|
51
|
-
(0, test_1.expect)(shortCut).toBe(util_1.OSUtil.isMacOS ? '⌥ N' : 'Alt+N');
|
|
52
|
-
const hasSubmenu = await (menuItem === null || menuItem === void 0 ? void 0 : menuItem.hasSubmenu());
|
|
53
|
-
(0, test_1.expect)(hasSubmenu).toBe(false);
|
|
54
|
-
});
|
|
55
|
-
(0, theia_fixture_1.default)('should detect whether menu item has submenu', async () => {
|
|
56
|
-
const mainMenu = await menuBar.openMenu('File');
|
|
57
|
-
const newFileItem = await mainMenu.menuItemByName('New File');
|
|
58
|
-
const settingsItem = await mainMenu.menuItemByName('Preferences');
|
|
59
|
-
(0, test_1.expect)(await (newFileItem === null || newFileItem === void 0 ? void 0 : newFileItem.hasSubmenu())).toBe(false);
|
|
60
|
-
(0, test_1.expect)(await (settingsItem === null || settingsItem === void 0 ? void 0 : settingsItem.hasSubmenu())).toBe(true);
|
|
61
|
-
});
|
|
62
|
-
(0, theia_fixture_1.default)('should be able to show menu item in submenu by path', async () => {
|
|
63
|
-
const mainMenu = await menuBar.openMenu('File');
|
|
64
|
-
const openPreferencesItem = await mainMenu.menuItemByNamePath('Preferences', 'Open Settings (UI)');
|
|
65
|
-
const label = await (openPreferencesItem === null || openPreferencesItem === void 0 ? void 0 : openPreferencesItem.label());
|
|
66
|
-
(0, test_1.expect)(label).toBe('Open Settings (UI)');
|
|
67
|
-
});
|
|
68
|
-
(0, theia_fixture_1.default)('should close main menu', async () => {
|
|
69
|
-
const mainMenu = await menuBar.openMenu('File');
|
|
70
|
-
await mainMenu.close();
|
|
71
|
-
(0, test_1.expect)(await mainMenu.isOpen()).toBe(false);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 logi.cals GmbH, EclipseSource 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 WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const test_1 = require("@playwright/test");
|
|
19
|
+
const util_1 = require("../util");
|
|
20
|
+
const theia_app_1 = require("../theia-app");
|
|
21
|
+
const theia_fixture_1 = require("./fixtures/theia-fixture");
|
|
22
|
+
let menuBar;
|
|
23
|
+
theia_fixture_1.default.describe('Theia Main Menu', () => {
|
|
24
|
+
theia_fixture_1.default.beforeAll(async () => {
|
|
25
|
+
const app = await theia_app_1.TheiaApp.load(theia_fixture_1.page);
|
|
26
|
+
menuBar = app.menuBar;
|
|
27
|
+
});
|
|
28
|
+
(0, theia_fixture_1.default)('should show the main menu bar', async () => {
|
|
29
|
+
const menuBarItems = await menuBar.visibleMenuBarItems();
|
|
30
|
+
(0, test_1.expect)(menuBarItems).toContain('File');
|
|
31
|
+
(0, test_1.expect)(menuBarItems).toContain('Edit');
|
|
32
|
+
(0, test_1.expect)(menuBarItems).toContain('Help');
|
|
33
|
+
});
|
|
34
|
+
(0, theia_fixture_1.default)("should open main menu 'File'", async () => {
|
|
35
|
+
const mainMenu = await menuBar.openMenu('File');
|
|
36
|
+
(0, test_1.expect)(await mainMenu.isOpen()).toBe(true);
|
|
37
|
+
});
|
|
38
|
+
(0, theia_fixture_1.default)("should show the menu items 'New File' and 'New Folder'", async () => {
|
|
39
|
+
const mainMenu = await menuBar.openMenu('File');
|
|
40
|
+
const menuItems = await mainMenu.visibleMenuItems();
|
|
41
|
+
(0, test_1.expect)(menuItems).toContain('New File');
|
|
42
|
+
(0, test_1.expect)(menuItems).toContain('New Folder');
|
|
43
|
+
});
|
|
44
|
+
(0, theia_fixture_1.default)("should return menu item by name 'New File'", async () => {
|
|
45
|
+
const mainMenu = await menuBar.openMenu('File');
|
|
46
|
+
const menuItem = await mainMenu.menuItemByName('New File');
|
|
47
|
+
(0, test_1.expect)(menuItem).toBeDefined();
|
|
48
|
+
const label = await (menuItem === null || menuItem === void 0 ? void 0 : menuItem.label());
|
|
49
|
+
(0, test_1.expect)(label).toBe('New File');
|
|
50
|
+
const shortCut = await (menuItem === null || menuItem === void 0 ? void 0 : menuItem.shortCut());
|
|
51
|
+
(0, test_1.expect)(shortCut).toBe(util_1.OSUtil.isMacOS ? '⌥ N' : 'Alt+N');
|
|
52
|
+
const hasSubmenu = await (menuItem === null || menuItem === void 0 ? void 0 : menuItem.hasSubmenu());
|
|
53
|
+
(0, test_1.expect)(hasSubmenu).toBe(false);
|
|
54
|
+
});
|
|
55
|
+
(0, theia_fixture_1.default)('should detect whether menu item has submenu', async () => {
|
|
56
|
+
const mainMenu = await menuBar.openMenu('File');
|
|
57
|
+
const newFileItem = await mainMenu.menuItemByName('New File');
|
|
58
|
+
const settingsItem = await mainMenu.menuItemByName('Preferences');
|
|
59
|
+
(0, test_1.expect)(await (newFileItem === null || newFileItem === void 0 ? void 0 : newFileItem.hasSubmenu())).toBe(false);
|
|
60
|
+
(0, test_1.expect)(await (settingsItem === null || settingsItem === void 0 ? void 0 : settingsItem.hasSubmenu())).toBe(true);
|
|
61
|
+
});
|
|
62
|
+
(0, theia_fixture_1.default)('should be able to show menu item in submenu by path', async () => {
|
|
63
|
+
const mainMenu = await menuBar.openMenu('File');
|
|
64
|
+
const openPreferencesItem = await mainMenu.menuItemByNamePath('Preferences', 'Open Settings (UI)');
|
|
65
|
+
const label = await (openPreferencesItem === null || openPreferencesItem === void 0 ? void 0 : openPreferencesItem.label());
|
|
66
|
+
(0, test_1.expect)(label).toBe('Open Settings (UI)');
|
|
67
|
+
});
|
|
68
|
+
(0, theia_fixture_1.default)('should close main menu', async () => {
|
|
69
|
+
const mainMenu = await menuBar.openMenu('File');
|
|
70
|
+
await mainMenu.close();
|
|
71
|
+
(0, test_1.expect)(await mainMenu.isOpen()).toBe(false);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
74
|
//# sourceMappingURL=theia-main-menu.test.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=theia-preference-view.test.d.ts.map
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2021 logi.cals GmbH, EclipseSource 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 WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const test_1 = require("@playwright/test");
|
|
19
|
-
const theia_app_1 = require("../theia-app");
|
|
20
|
-
const theia_preference_view_1 = require("../theia-preference-view");
|
|
21
|
-
const theia_fixture_1 = require("./fixtures/theia-fixture");
|
|
22
|
-
let app;
|
|
23
|
-
theia_fixture_1.default.describe('Preference View', () => {
|
|
24
|
-
theia_fixture_1.default.beforeAll(async () => {
|
|
25
|
-
app = await theia_app_1.TheiaApp.load(theia_fixture_1.page);
|
|
26
|
-
});
|
|
27
|
-
(0, theia_fixture_1.default)('should be visible and active after being opened', async () => {
|
|
28
|
-
const preferenceView = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
29
|
-
(0, test_1.expect)(await preferenceView.isTabVisible()).toBe(true);
|
|
30
|
-
(0, test_1.expect)(await preferenceView.isDisplayed()).toBe(true);
|
|
31
|
-
(0, test_1.expect)(await preferenceView.isActive()).toBe(true);
|
|
32
|
-
});
|
|
33
|
-
(0, theia_fixture_1.default)('should be able to read, set, and reset String preferences', async () => {
|
|
34
|
-
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
35
|
-
const preferenceId = theia_preference_view_1.PreferenceIds.DiffEditor.MaxComputationTime;
|
|
36
|
-
await preferences.resetPreferenceById(preferenceId);
|
|
37
|
-
(0, test_1.expect)(await preferences.getStringPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.DiffEditor.MaxComputationTime);
|
|
38
|
-
await preferences.setStringPreferenceById(preferenceId, '8000');
|
|
39
|
-
await preferences.waitForModified(preferenceId);
|
|
40
|
-
(0, test_1.expect)(await preferences.getStringPreferenceById(preferenceId)).toBe('8000');
|
|
41
|
-
await preferences.resetPreferenceById(preferenceId);
|
|
42
|
-
(0, test_1.expect)(await preferences.getStringPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.DiffEditor.MaxComputationTime);
|
|
43
|
-
});
|
|
44
|
-
(0, theia_fixture_1.default)('should be able to read, set, and reset Boolean preferences', async () => {
|
|
45
|
-
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
46
|
-
const preferenceId = theia_preference_view_1.PreferenceIds.Explorer.AutoReveal;
|
|
47
|
-
await preferences.resetPreferenceById(preferenceId);
|
|
48
|
-
(0, test_1.expect)(await preferences.getBooleanPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Explorer.AutoReveal.Enabled);
|
|
49
|
-
await preferences.setBooleanPreferenceById(preferenceId, false);
|
|
50
|
-
await preferences.waitForModified(preferenceId);
|
|
51
|
-
(0, test_1.expect)(await preferences.getBooleanPreferenceById(preferenceId)).toBe(false);
|
|
52
|
-
await preferences.resetPreferenceById(preferenceId);
|
|
53
|
-
(0, test_1.expect)(await preferences.getBooleanPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Explorer.AutoReveal.Enabled);
|
|
54
|
-
});
|
|
55
|
-
(0, theia_fixture_1.default)('should be able to read, set, and reset Options preferences', async () => {
|
|
56
|
-
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
57
|
-
const preferenceId = theia_preference_view_1.PreferenceIds.Editor.RenderWhitespace;
|
|
58
|
-
await preferences.resetPreferenceById(preferenceId);
|
|
59
|
-
(0, test_1.expect)(await preferences.getOptionsPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Editor.RenderWhitespace.Selection);
|
|
60
|
-
await preferences.setOptionsPreferenceById(preferenceId, theia_preference_view_1.DefaultPreferences.Editor.RenderWhitespace.Boundary);
|
|
61
|
-
await preferences.waitForModified(preferenceId);
|
|
62
|
-
(0, test_1.expect)(await preferences.getOptionsPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Editor.RenderWhitespace.Boundary);
|
|
63
|
-
await preferences.resetPreferenceById(preferenceId);
|
|
64
|
-
(0, test_1.expect)(await preferences.getOptionsPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Editor.RenderWhitespace.Selection);
|
|
65
|
-
});
|
|
66
|
-
(0, theia_fixture_1.default)('should throw an error if we try to read, set, or reset a non-existing preference', async () => {
|
|
67
|
-
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
68
|
-
preferences.customTimeout = 500;
|
|
69
|
-
try {
|
|
70
|
-
await (0, test_1.expect)(preferences.getBooleanPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
71
|
-
await (0, test_1.expect)(preferences.setBooleanPreferenceById('not.a.real.preference', true)).rejects.toThrowError();
|
|
72
|
-
await (0, test_1.expect)(preferences.resetPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
73
|
-
await (0, test_1.expect)(preferences.getStringPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
74
|
-
await (0, test_1.expect)(preferences.setStringPreferenceById('not.a.real.preference', 'a')).rejects.toThrowError();
|
|
75
|
-
await (0, test_1.expect)(preferences.resetPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
76
|
-
await (0, test_1.expect)(preferences.getOptionsPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
77
|
-
await (0, test_1.expect)(preferences.setOptionsPreferenceById('not.a.real.preference', 'a')).rejects.toThrowError();
|
|
78
|
-
await (0, test_1.expect)(preferences.resetPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
79
|
-
}
|
|
80
|
-
finally {
|
|
81
|
-
preferences.customTimeout = undefined;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
(0, theia_fixture_1.default)('should throw an error if we try to read, or set a preference with the wrong type', async () => {
|
|
85
|
-
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
86
|
-
const stringPreference = theia_preference_view_1.PreferenceIds.DiffEditor.MaxComputationTime;
|
|
87
|
-
const booleanPreference = theia_preference_view_1.PreferenceIds.Explorer.AutoReveal;
|
|
88
|
-
preferences.customTimeout = 500;
|
|
89
|
-
try {
|
|
90
|
-
await (0, test_1.expect)(preferences.getBooleanPreferenceById(stringPreference)).rejects.toThrowError();
|
|
91
|
-
await (0, test_1.expect)(preferences.setBooleanPreferenceById(stringPreference, true)).rejects.toThrowError();
|
|
92
|
-
await (0, test_1.expect)(preferences.setStringPreferenceById(booleanPreference, 'true')).rejects.toThrowError();
|
|
93
|
-
await (0, test_1.expect)(preferences.setOptionsPreferenceById(booleanPreference, 'true')).rejects.toThrowError();
|
|
94
|
-
}
|
|
95
|
-
finally {
|
|
96
|
-
preferences.customTimeout = undefined;
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 logi.cals GmbH, EclipseSource 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 WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const test_1 = require("@playwright/test");
|
|
19
|
+
const theia_app_1 = require("../theia-app");
|
|
20
|
+
const theia_preference_view_1 = require("../theia-preference-view");
|
|
21
|
+
const theia_fixture_1 = require("./fixtures/theia-fixture");
|
|
22
|
+
let app;
|
|
23
|
+
theia_fixture_1.default.describe('Preference View', () => {
|
|
24
|
+
theia_fixture_1.default.beforeAll(async () => {
|
|
25
|
+
app = await theia_app_1.TheiaApp.load(theia_fixture_1.page);
|
|
26
|
+
});
|
|
27
|
+
(0, theia_fixture_1.default)('should be visible and active after being opened', async () => {
|
|
28
|
+
const preferenceView = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
29
|
+
(0, test_1.expect)(await preferenceView.isTabVisible()).toBe(true);
|
|
30
|
+
(0, test_1.expect)(await preferenceView.isDisplayed()).toBe(true);
|
|
31
|
+
(0, test_1.expect)(await preferenceView.isActive()).toBe(true);
|
|
32
|
+
});
|
|
33
|
+
(0, theia_fixture_1.default)('should be able to read, set, and reset String preferences', async () => {
|
|
34
|
+
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
35
|
+
const preferenceId = theia_preference_view_1.PreferenceIds.DiffEditor.MaxComputationTime;
|
|
36
|
+
await preferences.resetPreferenceById(preferenceId);
|
|
37
|
+
(0, test_1.expect)(await preferences.getStringPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.DiffEditor.MaxComputationTime);
|
|
38
|
+
await preferences.setStringPreferenceById(preferenceId, '8000');
|
|
39
|
+
await preferences.waitForModified(preferenceId);
|
|
40
|
+
(0, test_1.expect)(await preferences.getStringPreferenceById(preferenceId)).toBe('8000');
|
|
41
|
+
await preferences.resetPreferenceById(preferenceId);
|
|
42
|
+
(0, test_1.expect)(await preferences.getStringPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.DiffEditor.MaxComputationTime);
|
|
43
|
+
});
|
|
44
|
+
(0, theia_fixture_1.default)('should be able to read, set, and reset Boolean preferences', async () => {
|
|
45
|
+
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
46
|
+
const preferenceId = theia_preference_view_1.PreferenceIds.Explorer.AutoReveal;
|
|
47
|
+
await preferences.resetPreferenceById(preferenceId);
|
|
48
|
+
(0, test_1.expect)(await preferences.getBooleanPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Explorer.AutoReveal.Enabled);
|
|
49
|
+
await preferences.setBooleanPreferenceById(preferenceId, false);
|
|
50
|
+
await preferences.waitForModified(preferenceId);
|
|
51
|
+
(0, test_1.expect)(await preferences.getBooleanPreferenceById(preferenceId)).toBe(false);
|
|
52
|
+
await preferences.resetPreferenceById(preferenceId);
|
|
53
|
+
(0, test_1.expect)(await preferences.getBooleanPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Explorer.AutoReveal.Enabled);
|
|
54
|
+
});
|
|
55
|
+
(0, theia_fixture_1.default)('should be able to read, set, and reset Options preferences', async () => {
|
|
56
|
+
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
57
|
+
const preferenceId = theia_preference_view_1.PreferenceIds.Editor.RenderWhitespace;
|
|
58
|
+
await preferences.resetPreferenceById(preferenceId);
|
|
59
|
+
(0, test_1.expect)(await preferences.getOptionsPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Editor.RenderWhitespace.Selection);
|
|
60
|
+
await preferences.setOptionsPreferenceById(preferenceId, theia_preference_view_1.DefaultPreferences.Editor.RenderWhitespace.Boundary);
|
|
61
|
+
await preferences.waitForModified(preferenceId);
|
|
62
|
+
(0, test_1.expect)(await preferences.getOptionsPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Editor.RenderWhitespace.Boundary);
|
|
63
|
+
await preferences.resetPreferenceById(preferenceId);
|
|
64
|
+
(0, test_1.expect)(await preferences.getOptionsPreferenceById(preferenceId)).toBe(theia_preference_view_1.DefaultPreferences.Editor.RenderWhitespace.Selection);
|
|
65
|
+
});
|
|
66
|
+
(0, theia_fixture_1.default)('should throw an error if we try to read, set, or reset a non-existing preference', async () => {
|
|
67
|
+
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
68
|
+
preferences.customTimeout = 500;
|
|
69
|
+
try {
|
|
70
|
+
await (0, test_1.expect)(preferences.getBooleanPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
71
|
+
await (0, test_1.expect)(preferences.setBooleanPreferenceById('not.a.real.preference', true)).rejects.toThrowError();
|
|
72
|
+
await (0, test_1.expect)(preferences.resetPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
73
|
+
await (0, test_1.expect)(preferences.getStringPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
74
|
+
await (0, test_1.expect)(preferences.setStringPreferenceById('not.a.real.preference', 'a')).rejects.toThrowError();
|
|
75
|
+
await (0, test_1.expect)(preferences.resetPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
76
|
+
await (0, test_1.expect)(preferences.getOptionsPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
77
|
+
await (0, test_1.expect)(preferences.setOptionsPreferenceById('not.a.real.preference', 'a')).rejects.toThrowError();
|
|
78
|
+
await (0, test_1.expect)(preferences.resetPreferenceById('not.a.real.preference')).rejects.toThrowError();
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
preferences.customTimeout = undefined;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
(0, theia_fixture_1.default)('should throw an error if we try to read, or set a preference with the wrong type', async () => {
|
|
85
|
+
const preferences = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
|
|
86
|
+
const stringPreference = theia_preference_view_1.PreferenceIds.DiffEditor.MaxComputationTime;
|
|
87
|
+
const booleanPreference = theia_preference_view_1.PreferenceIds.Explorer.AutoReveal;
|
|
88
|
+
preferences.customTimeout = 500;
|
|
89
|
+
try {
|
|
90
|
+
await (0, test_1.expect)(preferences.getBooleanPreferenceById(stringPreference)).rejects.toThrowError();
|
|
91
|
+
await (0, test_1.expect)(preferences.setBooleanPreferenceById(stringPreference, true)).rejects.toThrowError();
|
|
92
|
+
await (0, test_1.expect)(preferences.setStringPreferenceById(booleanPreference, 'true')).rejects.toThrowError();
|
|
93
|
+
await (0, test_1.expect)(preferences.setOptionsPreferenceById(booleanPreference, 'true')).rejects.toThrowError();
|
|
94
|
+
}
|
|
95
|
+
finally {
|
|
96
|
+
preferences.customTimeout = undefined;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
100
|
//# sourceMappingURL=theia-preference-view.test.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=theia-problems-view.test.d.ts.map
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2021 logi.cals GmbH, EclipseSource 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 WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const test_1 = require("@playwright/test");
|
|
19
|
-
const theia_app_1 = require("../theia-app");
|
|
20
|
-
const theia_problem_view_1 = require("../theia-problem-view");
|
|
21
|
-
const theia_fixture_1 = require("./fixtures/theia-fixture");
|
|
22
|
-
let app;
|
|
23
|
-
theia_fixture_1.default.describe('Theia Problems View', () => {
|
|
24
|
-
theia_fixture_1.default.beforeAll(async () => {
|
|
25
|
-
app = await theia_app_1.TheiaApp.load(theia_fixture_1.page);
|
|
26
|
-
});
|
|
27
|
-
(0, theia_fixture_1.default)('should be visible and active after being opened', async () => {
|
|
28
|
-
const problemsView = await app.openView(theia_problem_view_1.TheiaProblemsView);
|
|
29
|
-
(0, test_1.expect)(await problemsView.isTabVisible()).toBe(true);
|
|
30
|
-
(0, test_1.expect)(await problemsView.isDisplayed()).toBe(true);
|
|
31
|
-
(0, test_1.expect)(await problemsView.isActive()).toBe(true);
|
|
32
|
-
});
|
|
33
|
-
(0, theia_fixture_1.default)("should be opened at the bottom and have the title 'Problems'", async () => {
|
|
34
|
-
const problemsView = await app.openView(theia_problem_view_1.TheiaProblemsView);
|
|
35
|
-
(0, test_1.expect)(await problemsView.isInSidePanel()).toBe(false);
|
|
36
|
-
(0, test_1.expect)(await problemsView.side()).toBe('bottom');
|
|
37
|
-
(0, test_1.expect)(await problemsView.title()).toBe('Problems');
|
|
38
|
-
});
|
|
39
|
-
(0, theia_fixture_1.default)('should be closable', async () => {
|
|
40
|
-
const problemsView = await app.openView(theia_problem_view_1.TheiaProblemsView);
|
|
41
|
-
(0, test_1.expect)(await problemsView.isClosable()).toBe(true);
|
|
42
|
-
await problemsView.close();
|
|
43
|
-
(0, test_1.expect)(await problemsView.isTabVisible()).toBe(false);
|
|
44
|
-
(0, test_1.expect)(await problemsView.isDisplayed()).toBe(false);
|
|
45
|
-
(0, test_1.expect)(await problemsView.isActive()).toBe(false);
|
|
46
|
-
});
|
|
47
|
-
(0, theia_fixture_1.default)("should not throw an error if 'close' is called twice", async () => {
|
|
48
|
-
const problemsView = await app.openView(theia_problem_view_1.TheiaProblemsView);
|
|
49
|
-
await problemsView.close();
|
|
50
|
-
await problemsView.close();
|
|
51
|
-
});
|
|
52
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 logi.cals GmbH, EclipseSource 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 WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const test_1 = require("@playwright/test");
|
|
19
|
+
const theia_app_1 = require("../theia-app");
|
|
20
|
+
const theia_problem_view_1 = require("../theia-problem-view");
|
|
21
|
+
const theia_fixture_1 = require("./fixtures/theia-fixture");
|
|
22
|
+
let app;
|
|
23
|
+
theia_fixture_1.default.describe('Theia Problems View', () => {
|
|
24
|
+
theia_fixture_1.default.beforeAll(async () => {
|
|
25
|
+
app = await theia_app_1.TheiaApp.load(theia_fixture_1.page);
|
|
26
|
+
});
|
|
27
|
+
(0, theia_fixture_1.default)('should be visible and active after being opened', async () => {
|
|
28
|
+
const problemsView = await app.openView(theia_problem_view_1.TheiaProblemsView);
|
|
29
|
+
(0, test_1.expect)(await problemsView.isTabVisible()).toBe(true);
|
|
30
|
+
(0, test_1.expect)(await problemsView.isDisplayed()).toBe(true);
|
|
31
|
+
(0, test_1.expect)(await problemsView.isActive()).toBe(true);
|
|
32
|
+
});
|
|
33
|
+
(0, theia_fixture_1.default)("should be opened at the bottom and have the title 'Problems'", async () => {
|
|
34
|
+
const problemsView = await app.openView(theia_problem_view_1.TheiaProblemsView);
|
|
35
|
+
(0, test_1.expect)(await problemsView.isInSidePanel()).toBe(false);
|
|
36
|
+
(0, test_1.expect)(await problemsView.side()).toBe('bottom');
|
|
37
|
+
(0, test_1.expect)(await problemsView.title()).toBe('Problems');
|
|
38
|
+
});
|
|
39
|
+
(0, theia_fixture_1.default)('should be closable', async () => {
|
|
40
|
+
const problemsView = await app.openView(theia_problem_view_1.TheiaProblemsView);
|
|
41
|
+
(0, test_1.expect)(await problemsView.isClosable()).toBe(true);
|
|
42
|
+
await problemsView.close();
|
|
43
|
+
(0, test_1.expect)(await problemsView.isTabVisible()).toBe(false);
|
|
44
|
+
(0, test_1.expect)(await problemsView.isDisplayed()).toBe(false);
|
|
45
|
+
(0, test_1.expect)(await problemsView.isActive()).toBe(false);
|
|
46
|
+
});
|
|
47
|
+
(0, theia_fixture_1.default)("should not throw an error if 'close' is called twice", async () => {
|
|
48
|
+
const problemsView = await app.openView(theia_problem_view_1.TheiaProblemsView);
|
|
49
|
+
await problemsView.close();
|
|
50
|
+
await problemsView.close();
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
53
|
//# sourceMappingURL=theia-problems-view.test.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=theia-quick-command.test.d.ts.map
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2021 logi.cals GmbH, EclipseSource 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 WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const test_1 = require("@playwright/test");
|
|
19
|
-
const theia_about_dialog_1 = require("../theia-about-dialog");
|
|
20
|
-
const theia_app_1 = require("../theia-app");
|
|
21
|
-
const theia_explorer_view_1 = require("../theia-explorer-view");
|
|
22
|
-
const theia_fixture_1 = require("./fixtures/theia-fixture");
|
|
23
|
-
let app;
|
|
24
|
-
let quickCommand;
|
|
25
|
-
theia_fixture_1.default.describe('Theia Quick Command', () => {
|
|
26
|
-
theia_fixture_1.default.beforeAll(async () => {
|
|
27
|
-
app = await theia_app_1.TheiaApp.load(theia_fixture_1.page);
|
|
28
|
-
quickCommand = app.quickCommandPalette;
|
|
29
|
-
});
|
|
30
|
-
(0, theia_fixture_1.default)('should show quick command palette', async () => {
|
|
31
|
-
await quickCommand.open();
|
|
32
|
-
(0, test_1.expect)(await quickCommand.isOpen()).toBe(true);
|
|
33
|
-
});
|
|
34
|
-
(0, theia_fixture_1.default)('should trigger \'About\' command after typing', async () => {
|
|
35
|
-
await quickCommand.type('About');
|
|
36
|
-
await quickCommand.trigger('About');
|
|
37
|
-
(0, test_1.expect)(await quickCommand.isOpen()).toBe(false);
|
|
38
|
-
const aboutDialog = new theia_about_dialog_1.TheiaAboutDialog(app);
|
|
39
|
-
(0, test_1.expect)(await aboutDialog.isVisible()).toBe(true);
|
|
40
|
-
await aboutDialog.close();
|
|
41
|
-
(0, test_1.expect)(await aboutDialog.isVisible()).toBe(false);
|
|
42
|
-
await quickCommand.type('Select All');
|
|
43
|
-
await quickCommand.trigger('Select All');
|
|
44
|
-
(0, test_1.expect)(await quickCommand.isOpen()).toBe(false);
|
|
45
|
-
});
|
|
46
|
-
(0, theia_fixture_1.default)('should trigger \'Toggle Explorer View\' command after typing', async () => {
|
|
47
|
-
await quickCommand.type('Toggle Explorer');
|
|
48
|
-
await quickCommand.trigger('Toggle Explorer View');
|
|
49
|
-
(0, test_1.expect)(await quickCommand.isOpen()).toBe(false);
|
|
50
|
-
const explorerView = new theia_explorer_view_1.TheiaExplorerView(app);
|
|
51
|
-
(0, test_1.expect)(await explorerView.isDisplayed()).toBe(true);
|
|
52
|
-
});
|
|
53
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2021 logi.cals GmbH, EclipseSource 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 WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const test_1 = require("@playwright/test");
|
|
19
|
+
const theia_about_dialog_1 = require("../theia-about-dialog");
|
|
20
|
+
const theia_app_1 = require("../theia-app");
|
|
21
|
+
const theia_explorer_view_1 = require("../theia-explorer-view");
|
|
22
|
+
const theia_fixture_1 = require("./fixtures/theia-fixture");
|
|
23
|
+
let app;
|
|
24
|
+
let quickCommand;
|
|
25
|
+
theia_fixture_1.default.describe('Theia Quick Command', () => {
|
|
26
|
+
theia_fixture_1.default.beforeAll(async () => {
|
|
27
|
+
app = await theia_app_1.TheiaApp.load(theia_fixture_1.page);
|
|
28
|
+
quickCommand = app.quickCommandPalette;
|
|
29
|
+
});
|
|
30
|
+
(0, theia_fixture_1.default)('should show quick command palette', async () => {
|
|
31
|
+
await quickCommand.open();
|
|
32
|
+
(0, test_1.expect)(await quickCommand.isOpen()).toBe(true);
|
|
33
|
+
});
|
|
34
|
+
(0, theia_fixture_1.default)('should trigger \'About\' command after typing', async () => {
|
|
35
|
+
await quickCommand.type('About');
|
|
36
|
+
await quickCommand.trigger('About');
|
|
37
|
+
(0, test_1.expect)(await quickCommand.isOpen()).toBe(false);
|
|
38
|
+
const aboutDialog = new theia_about_dialog_1.TheiaAboutDialog(app);
|
|
39
|
+
(0, test_1.expect)(await aboutDialog.isVisible()).toBe(true);
|
|
40
|
+
await aboutDialog.close();
|
|
41
|
+
(0, test_1.expect)(await aboutDialog.isVisible()).toBe(false);
|
|
42
|
+
await quickCommand.type('Select All');
|
|
43
|
+
await quickCommand.trigger('Select All');
|
|
44
|
+
(0, test_1.expect)(await quickCommand.isOpen()).toBe(false);
|
|
45
|
+
});
|
|
46
|
+
(0, theia_fixture_1.default)('should trigger \'Toggle Explorer View\' command after typing', async () => {
|
|
47
|
+
await quickCommand.type('Toggle Explorer');
|
|
48
|
+
await quickCommand.trigger('Toggle Explorer View');
|
|
49
|
+
(0, test_1.expect)(await quickCommand.isOpen()).toBe(false);
|
|
50
|
+
const explorerView = new theia_explorer_view_1.TheiaExplorerView(app);
|
|
51
|
+
(0, test_1.expect)(await explorerView.isDisplayed()).toBe(true);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
54
|
//# sourceMappingURL=theia-quick-command.test.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=theia-sample-app.test.d.ts.map
|