@theia/playwright 1.67.0-next.13 → 1.67.0-next.56

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.
Files changed (213) hide show
  1. package/package.json +3 -3
  2. package/lib/index.d.ts +0 -37
  3. package/lib/index.d.ts.map +0 -1
  4. package/lib/index.js +0 -55
  5. package/lib/index.js.map +0 -1
  6. package/lib/tests/theia-app.test.d.ts +0 -2
  7. package/lib/tests/theia-app.test.d.ts.map +0 -1
  8. package/lib/tests/theia-app.test.js +0 -30
  9. package/lib/tests/theia-app.test.js.map +0 -1
  10. package/lib/tests/theia-application-shell.test.d.ts +0 -2
  11. package/lib/tests/theia-application-shell.test.d.ts.map +0 -1
  12. package/lib/tests/theia-application-shell.test.js +0 -59
  13. package/lib/tests/theia-application-shell.test.js.map +0 -1
  14. package/lib/tests/theia-explorer-view.test.d.ts +0 -2
  15. package/lib/tests/theia-explorer-view.test.d.ts.map +0 -1
  16. package/lib/tests/theia-explorer-view.test.js +0 -186
  17. package/lib/tests/theia-explorer-view.test.js.map +0 -1
  18. package/lib/tests/theia-getting-started.test.d.ts +0 -2
  19. package/lib/tests/theia-getting-started.test.d.ts.map +0 -1
  20. package/lib/tests/theia-getting-started.test.js +0 -46
  21. package/lib/tests/theia-getting-started.test.js.map +0 -1
  22. package/lib/tests/theia-main-menu.test.d.ts +0 -2
  23. package/lib/tests/theia-main-menu.test.d.ts.map +0 -1
  24. package/lib/tests/theia-main-menu.test.js +0 -111
  25. package/lib/tests/theia-main-menu.test.js.map +0 -1
  26. package/lib/tests/theia-notebook-editor.test.d.ts +0 -2
  27. package/lib/tests/theia-notebook-editor.test.d.ts.map +0 -1
  28. package/lib/tests/theia-notebook-editor.test.js +0 -301
  29. package/lib/tests/theia-notebook-editor.test.js.map +0 -1
  30. package/lib/tests/theia-output-view.test.d.ts +0 -2
  31. package/lib/tests/theia-output-view.test.d.ts.map +0 -1
  32. package/lib/tests/theia-output-view.test.js +0 -79
  33. package/lib/tests/theia-output-view.test.js.map +0 -1
  34. package/lib/tests/theia-preference-view.test.d.ts +0 -2
  35. package/lib/tests/theia-preference-view.test.d.ts.map +0 -1
  36. package/lib/tests/theia-preference-view.test.js +0 -102
  37. package/lib/tests/theia-preference-view.test.js.map +0 -1
  38. package/lib/tests/theia-problems-view.test.d.ts +0 -2
  39. package/lib/tests/theia-problems-view.test.d.ts.map +0 -1
  40. package/lib/tests/theia-problems-view.test.js +0 -55
  41. package/lib/tests/theia-problems-view.test.js.map +0 -1
  42. package/lib/tests/theia-quick-command.test.d.ts +0 -2
  43. package/lib/tests/theia-quick-command.test.d.ts.map +0 -1
  44. package/lib/tests/theia-quick-command.test.js +0 -75
  45. package/lib/tests/theia-quick-command.test.js.map +0 -1
  46. package/lib/tests/theia-sample-app.test.d.ts +0 -2
  47. package/lib/tests/theia-sample-app.test.d.ts.map +0 -1
  48. package/lib/tests/theia-sample-app.test.js +0 -58
  49. package/lib/tests/theia-sample-app.test.js.map +0 -1
  50. package/lib/tests/theia-status-bar.test.d.ts +0 -2
  51. package/lib/tests/theia-status-bar.test.d.ts.map +0 -1
  52. package/lib/tests/theia-status-bar.test.js +0 -45
  53. package/lib/tests/theia-status-bar.test.js.map +0 -1
  54. package/lib/tests/theia-terminal-view.test.d.ts +0 -2
  55. package/lib/tests/theia-terminal-view.test.d.ts.map +0 -1
  56. package/lib/tests/theia-terminal-view.test.js +0 -80
  57. package/lib/tests/theia-terminal-view.test.js.map +0 -1
  58. package/lib/tests/theia-text-editor.test.d.ts +0 -2
  59. package/lib/tests/theia-text-editor.test.d.ts.map +0 -1
  60. package/lib/tests/theia-text-editor.test.js +0 -159
  61. package/lib/tests/theia-text-editor.test.js.map +0 -1
  62. package/lib/tests/theia-toolbar.test.d.ts +0 -2
  63. package/lib/tests/theia-toolbar.test.d.ts.map +0 -1
  64. package/lib/tests/theia-toolbar.test.js +0 -62
  65. package/lib/tests/theia-toolbar.test.js.map +0 -1
  66. package/lib/tests/theia-workspace.test.d.ts +0 -2
  67. package/lib/tests/theia-workspace.test.d.ts.map +0 -1
  68. package/lib/tests/theia-workspace.test.js +0 -77
  69. package/lib/tests/theia-workspace.test.js.map +0 -1
  70. package/lib/theia-about-dialog.d.ts +0 -5
  71. package/lib/theia-about-dialog.d.ts.map +0 -1
  72. package/lib/theia-about-dialog.js +0 -27
  73. package/lib/theia-about-dialog.js.map +0 -1
  74. package/lib/theia-app-loader.d.ts +0 -20
  75. package/lib/theia-app-loader.d.ts.map +0 -1
  76. package/lib/theia-app-loader.js +0 -124
  77. package/lib/theia-app-loader.js.map +0 -1
  78. package/lib/theia-app.d.ts +0 -51
  79. package/lib/theia-app.d.ts.map +0 -1
  80. package/lib/theia-app.js +0 -154
  81. package/lib/theia-app.js.map +0 -1
  82. package/lib/theia-context-menu.d.ts +0 -9
  83. package/lib/theia-context-menu.d.ts.map +0 -1
  84. package/lib/theia-context-menu.js +0 -38
  85. package/lib/theia-context-menu.js.map +0 -1
  86. package/lib/theia-dialog.d.ts +0 -29
  87. package/lib/theia-dialog.d.ts.map +0 -1
  88. package/lib/theia-dialog.js +0 -100
  89. package/lib/theia-dialog.js.map +0 -1
  90. package/lib/theia-editor.d.ts +0 -10
  91. package/lib/theia-editor.d.ts.map +0 -1
  92. package/lib/theia-editor.js +0 -69
  93. package/lib/theia-editor.js.map +0 -1
  94. package/lib/theia-explorer-view.d.ts +0 -48
  95. package/lib/theia-explorer-view.d.ts.map +0 -1
  96. package/lib/theia-explorer-view.js +0 -274
  97. package/lib/theia-explorer-view.js.map +0 -1
  98. package/lib/theia-main-menu.d.ts +0 -17
  99. package/lib/theia-main-menu.d.ts.map +0 -1
  100. package/lib/theia-main-menu.js +0 -73
  101. package/lib/theia-main-menu.js.map +0 -1
  102. package/lib/theia-menu-item.d.ts +0 -15
  103. package/lib/theia-menu-item.d.ts.map +0 -1
  104. package/lib/theia-menu-item.js +0 -67
  105. package/lib/theia-menu-item.js.map +0 -1
  106. package/lib/theia-menu.d.ts +0 -17
  107. package/lib/theia-menu.d.ts.map +0 -1
  108. package/lib/theia-menu.js +0 -106
  109. package/lib/theia-menu.js.map +0 -1
  110. package/lib/theia-monaco-editor.d.ts +0 -63
  111. package/lib/theia-monaco-editor.d.ts.map +0 -1
  112. package/lib/theia-monaco-editor.js +0 -155
  113. package/lib/theia-monaco-editor.js.map +0 -1
  114. package/lib/theia-notebook-cell.d.ts +0 -104
  115. package/lib/theia-notebook-cell.d.ts.map +0 -1
  116. package/lib/theia-notebook-cell.js +0 -228
  117. package/lib/theia-notebook-cell.js.map +0 -1
  118. package/lib/theia-notebook-editor.d.ts +0 -50
  119. package/lib/theia-notebook-editor.d.ts.map +0 -1
  120. package/lib/theia-notebook-editor.js +0 -153
  121. package/lib/theia-notebook-editor.js.map +0 -1
  122. package/lib/theia-notebook-toolbar.d.ts +0 -13
  123. package/lib/theia-notebook-toolbar.d.ts.map +0 -1
  124. package/lib/theia-notebook-toolbar.js +0 -47
  125. package/lib/theia-notebook-toolbar.js.map +0 -1
  126. package/lib/theia-notification-indicator.d.ts +0 -8
  127. package/lib/theia-notification-indicator.d.ts.map +0 -1
  128. package/lib/theia-notification-indicator.js +0 -45
  129. package/lib/theia-notification-indicator.js.map +0 -1
  130. package/lib/theia-notification-overlay.d.ts +0 -23
  131. package/lib/theia-notification-overlay.d.ts.map +0 -1
  132. package/lib/theia-notification-overlay.js +0 -80
  133. package/lib/theia-notification-overlay.js.map +0 -1
  134. package/lib/theia-output-channel.d.ts +0 -25
  135. package/lib/theia-output-channel.d.ts.map +0 -1
  136. package/lib/theia-output-channel.js +0 -72
  137. package/lib/theia-output-channel.js.map +0 -1
  138. package/lib/theia-output-view.d.ts +0 -10
  139. package/lib/theia-output-view.d.ts.map +0 -1
  140. package/lib/theia-output-view.js +0 -82
  141. package/lib/theia-output-view.js.map +0 -1
  142. package/lib/theia-page-object.d.ts +0 -8
  143. package/lib/theia-page-object.d.ts.map +0 -1
  144. package/lib/theia-page-object.js +0 -28
  145. package/lib/theia-page-object.js.map +0 -1
  146. package/lib/theia-preference-view.d.ts +0 -91
  147. package/lib/theia-preference-view.d.ts.map +0 -1
  148. package/lib/theia-preference-view.js +0 -224
  149. package/lib/theia-preference-view.js.map +0 -1
  150. package/lib/theia-problem-indicator.d.ts +0 -9
  151. package/lib/theia-problem-indicator.d.ts.map +0 -1
  152. package/lib/theia-problem-indicator.js +0 -39
  153. package/lib/theia-problem-indicator.js.map +0 -1
  154. package/lib/theia-problem-view.d.ts +0 -6
  155. package/lib/theia-problem-view.d.ts.map +0 -1
  156. package/lib/theia-problem-view.js +0 -31
  157. package/lib/theia-problem-view.js.map +0 -1
  158. package/lib/theia-quick-command-palette.d.ts +0 -14
  159. package/lib/theia-quick-command-palette.d.ts.map +0 -1
  160. package/lib/theia-quick-command-palette.js +0 -87
  161. package/lib/theia-quick-command-palette.js.map +0 -1
  162. package/lib/theia-rename-dialog.d.ts +0 -6
  163. package/lib/theia-rename-dialog.d.ts.map +0 -1
  164. package/lib/theia-rename-dialog.js +0 -35
  165. package/lib/theia-rename-dialog.js.map +0 -1
  166. package/lib/theia-status-bar.d.ts +0 -14
  167. package/lib/theia-status-bar.d.ts.map +0 -1
  168. package/lib/theia-status-bar.js +0 -40
  169. package/lib/theia-status-bar.js.map +0 -1
  170. package/lib/theia-status-indicator.d.ts +0 -11
  171. package/lib/theia-status-indicator.d.ts.map +0 -1
  172. package/lib/theia-status-indicator.js +0 -49
  173. package/lib/theia-status-indicator.js.map +0 -1
  174. package/lib/theia-terminal.d.ts +0 -14
  175. package/lib/theia-terminal.d.ts.map +0 -1
  176. package/lib/theia-terminal.js +0 -60
  177. package/lib/theia-terminal.js.map +0 -1
  178. package/lib/theia-text-editor.d.ts +0 -27
  179. package/lib/theia-text-editor.d.ts.map +0 -1
  180. package/lib/theia-text-editor.js +0 -124
  181. package/lib/theia-text-editor.js.map +0 -1
  182. package/lib/theia-toggle-bottom-indicator.d.ts +0 -5
  183. package/lib/theia-toggle-bottom-indicator.d.ts.map +0 -1
  184. package/lib/theia-toggle-bottom-indicator.js +0 -27
  185. package/lib/theia-toggle-bottom-indicator.js.map +0 -1
  186. package/lib/theia-toolbar-item.d.ts +0 -11
  187. package/lib/theia-toolbar-item.d.ts.map +0 -1
  188. package/lib/theia-toolbar-item.js +0 -41
  189. package/lib/theia-toolbar-item.js.map +0 -1
  190. package/lib/theia-toolbar.d.ts +0 -20
  191. package/lib/theia-toolbar.d.ts.map +0 -1
  192. package/lib/theia-toolbar.js +0 -91
  193. package/lib/theia-toolbar.js.map +0 -1
  194. package/lib/theia-tree-node.d.ts +0 -20
  195. package/lib/theia-tree-node.d.ts.map +0 -1
  196. package/lib/theia-tree-node.js +0 -73
  197. package/lib/theia-tree-node.js.map +0 -1
  198. package/lib/theia-view.d.ts +0 -33
  199. package/lib/theia-view.d.ts.map +0 -1
  200. package/lib/theia-view.js +0 -150
  201. package/lib/theia-view.js.map +0 -1
  202. package/lib/theia-welcome-view.d.ts +0 -6
  203. package/lib/theia-welcome-view.d.ts.map +0 -1
  204. package/lib/theia-welcome-view.js +0 -31
  205. package/lib/theia-welcome-view.js.map +0 -1
  206. package/lib/theia-workspace.d.ts +0 -27
  207. package/lib/theia-workspace.d.ts.map +0 -1
  208. package/lib/theia-workspace.js +0 -84
  209. package/lib/theia-workspace.js.map +0 -1
  210. package/lib/util.d.ts +0 -18
  211. package/lib/util.d.ts.map +0 -1
  212. package/lib/util.js +0 -86
  213. package/lib/util.js.map +0 -1
@@ -1,159 +0,0 @@
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-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const test_1 = require("@playwright/test");
19
- const path = require("path");
20
- const theia_app_loader_1 = require("../theia-app-loader");
21
- const theia_preference_view_1 = require("../theia-preference-view");
22
- const theia_text_editor_1 = require("../theia-text-editor");
23
- const theia_workspace_1 = require("../theia-workspace");
24
- test_1.test.describe('Theia Text Editor', () => {
25
- let app;
26
- test_1.test.beforeAll(async ({ playwright, browser }) => {
27
- const ws = new theia_workspace_1.TheiaWorkspace([path.resolve(__dirname, '../../src/tests/resources/sample-files1')]);
28
- app = await theia_app_loader_1.TheiaAppLoader.load({ playwright, browser }, ws);
29
- // set auto-save preference to off
30
- const preferenceView = await app.openPreferences(theia_preference_view_1.TheiaPreferenceView);
31
- await preferenceView.setOptionsPreferenceById(theia_preference_view_1.PreferenceIds.Editor.AutoSave, theia_preference_view_1.DefaultPreferences.Editor.AutoSave.Off);
32
- await preferenceView.close();
33
- });
34
- test_1.test.afterAll(async () => {
35
- await app.page.close();
36
- });
37
- (0, test_1.test)('should be visible and active after opening "sample.txt"', async () => {
38
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
39
- (0, test_1.expect)(await sampleTextEditor.isTabVisible()).toBe(true);
40
- (0, test_1.expect)(await sampleTextEditor.isDisplayed()).toBe(true);
41
- (0, test_1.expect)(await sampleTextEditor.isActive()).toBe(true);
42
- });
43
- (0, test_1.test)('should be possible to open "sample.txt" when already opened and then close it', async () => {
44
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
45
- (0, test_1.expect)(await sampleTextEditor.isTabVisible()).toBe(true);
46
- await sampleTextEditor.close();
47
- (0, test_1.expect)(await sampleTextEditor.isTabVisible()).toBe(false);
48
- });
49
- (0, test_1.test)('should be possible to open four text editors, switch among them, and close them', async () => {
50
- const textEditor1_1_1 = await app.openEditor('sampleFolder/sampleFolder1/sampleFolder1-1/sampleFile1-1-1.txt', theia_text_editor_1.TheiaTextEditor);
51
- const textEditor1_1_2 = await app.openEditor('sampleFolder/sampleFolder1/sampleFolder1-1/sampleFile1-1-2.txt', theia_text_editor_1.TheiaTextEditor);
52
- const textEditor1_2_1 = await app.openEditor('sampleFolder/sampleFolder1/sampleFolder1-2/sampleFile1-2-1.txt', theia_text_editor_1.TheiaTextEditor);
53
- const textEditor1_2_2 = await app.openEditor('sampleFolder/sampleFolder1/sampleFolder1-2/sampleFile1-2-2.txt', theia_text_editor_1.TheiaTextEditor);
54
- const allEditors = [textEditor1_1_1, textEditor1_1_2, textEditor1_2_1, textEditor1_2_2];
55
- // all editor tabs should be visible
56
- for (const editor of allEditors) {
57
- (0, test_1.expect)(await editor.isTabVisible()).toBe(true);
58
- }
59
- // activate one editor after the other and check that only this editor is active
60
- for (const editor of allEditors) {
61
- await editor.activate();
62
- (0, test_1.expect)(await textEditor1_1_1.isActive()).toBe(textEditor1_1_1 === editor);
63
- (0, test_1.expect)(await textEditor1_1_2.isActive()).toBe(textEditor1_1_2 === editor);
64
- (0, test_1.expect)(await textEditor1_2_1.isActive()).toBe(textEditor1_2_1 === editor);
65
- (0, test_1.expect)(await textEditor1_2_2.isActive()).toBe(textEditor1_2_2 === editor);
66
- }
67
- // close all editors
68
- for (const editor of allEditors) {
69
- await editor.activate();
70
- await editor.close();
71
- }
72
- // check that all editors are closed
73
- for (const editor of allEditors) {
74
- (0, test_1.expect)(await editor.isTabVisible()).toBe(false);
75
- }
76
- });
77
- (0, test_1.test)('should return the contents of lines by line number', async () => {
78
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
79
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(2)).toBe('content line 2');
80
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(3)).toBe('content line 3');
81
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(4)).toBe('content line 4');
82
- await sampleTextEditor.close();
83
- });
84
- (0, test_1.test)('should return the contents of lines containing text', async () => {
85
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
86
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineContainingText('line 2')).toBe('content line 2');
87
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineContainingText('line 3')).toBe('content line 3');
88
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineContainingText('line 4')).toBe('content line 4');
89
- await sampleTextEditor.close();
90
- });
91
- (0, test_1.test)('should be dirty after changing the file contents and clean after save', async () => {
92
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
93
- await sampleTextEditor.replaceLineWithLineNumber('this is just a sample file', 1);
94
- (0, test_1.expect)(await sampleTextEditor.isDirty()).toBe(true);
95
- await sampleTextEditor.save();
96
- (0, test_1.expect)(await sampleTextEditor.isDirty()).toBe(false);
97
- await sampleTextEditor.close();
98
- });
99
- (0, test_1.test)('should replace the line with line number 2 with new text "new -- content line 2 -- new"', async () => {
100
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
101
- await sampleTextEditor.replaceLineWithLineNumber('new -- content line 2 -- new', 2);
102
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(2)).toBe('new -- content line 2 -- new');
103
- (0, test_1.expect)(await sampleTextEditor.isDirty()).toBe(true);
104
- await sampleTextEditor.save();
105
- (0, test_1.expect)(await sampleTextEditor.isDirty()).toBe(false);
106
- await sampleTextEditor.close();
107
- });
108
- (0, test_1.test)('should replace the line with containing text "content line 2" with "even newer -- content line 2 -- even newer"', async () => {
109
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
110
- await sampleTextEditor.replaceLineContainingText('even newer -- content line 2 -- even newer', 'content line 2');
111
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(2)).toBe('even newer -- content line 2 -- even newer');
112
- await sampleTextEditor.saveAndClose();
113
- });
114
- (0, test_1.test)('should delete the line with containing text "content line 2"', async () => {
115
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
116
- await sampleTextEditor.deleteLineContainingText('content line 2');
117
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(2)).toBe('content line 3');
118
- await sampleTextEditor.saveAndClose();
119
- });
120
- (0, test_1.test)('should delete the line with line number 2', async () => {
121
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
122
- const lineBelowSecond = await sampleTextEditor.textContentOfLineByLineNumber(3);
123
- await sampleTextEditor.deleteLineByLineNumber(2);
124
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(2)).toBe(lineBelowSecond);
125
- await sampleTextEditor.saveAndClose();
126
- });
127
- (0, test_1.test)('should have more lines after adding text in new line after line containing text "sample file"', async () => {
128
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
129
- const numberOfLinesBefore = await sampleTextEditor.numberOfLines();
130
- await sampleTextEditor.addTextToNewLineAfterLineContainingText('sample file', 'new content for line 2');
131
- const numberOfLinesAfter = await sampleTextEditor.numberOfLines();
132
- (0, test_1.expect)(numberOfLinesBefore).not.toBeUndefined();
133
- (0, test_1.expect)(numberOfLinesAfter).not.toBeUndefined();
134
- (0, test_1.expect)(numberOfLinesAfter).toBeGreaterThan(numberOfLinesBefore);
135
- await sampleTextEditor.saveAndClose();
136
- });
137
- (0, test_1.test)('should undo and redo text changes with correctly updated dirty states', async () => {
138
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
139
- await sampleTextEditor.replaceLineWithLineNumber('change', 1);
140
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(1)).toBe('change');
141
- (0, test_1.expect)(await sampleTextEditor.isDirty()).toBe(true);
142
- await sampleTextEditor.undo(2);
143
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(1)).toBe('this is just a sample file');
144
- (0, test_1.expect)(await sampleTextEditor.isDirty()).toBe(false);
145
- await sampleTextEditor.redo(2);
146
- (0, test_1.expect)(await sampleTextEditor.textContentOfLineByLineNumber(1)).toBe('change');
147
- (0, test_1.expect)(await sampleTextEditor.isDirty()).toBe(true);
148
- await sampleTextEditor.saveAndClose();
149
- });
150
- (0, test_1.test)('should close without saving', async () => {
151
- const sampleTextEditor = await app.openEditor('sample.txt', theia_text_editor_1.TheiaTextEditor);
152
- await sampleTextEditor.replaceLineWithLineNumber('change again', 1);
153
- (0, test_1.expect)(await sampleTextEditor.isDirty()).toBe(true);
154
- (0, test_1.expect)(await sampleTextEditor.isTabVisible()).toBe(true);
155
- await sampleTextEditor.closeWithoutSave();
156
- (0, test_1.expect)(await sampleTextEditor.isTabVisible()).toBe(false);
157
- });
158
- });
159
- //# sourceMappingURL=theia-text-editor.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-text-editor.test.js","sourceRoot":"","sources":["../../src/tests/theia-text-editor.test.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,2CAAgD;AAChD,6BAA6B;AAE7B,0DAAqD;AACrD,oEAAkG;AAClG,4DAAuD;AACvD,wDAAoD;AAEpD,WAAI,CAAC,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAEpC,IAAI,GAAa,CAAC;IAElB,WAAI,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7C,MAAM,EAAE,GAAG,IAAI,gCAAc,CAA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CAAC,IAAI,CAAC,CAAC;QAEpD,IAAA,aAAM,EAAC,MAAM,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,MAAM,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;QAC1C,IAAA,aAAM,EAAC,MAAM,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=theia-toolbar.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-toolbar.test.d.ts","sourceRoot":"","sources":["../../src/tests/theia-toolbar.test.ts"],"names":[],"mappings":""}
@@ -1,62 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2023 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-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const test_1 = require("@playwright/test");
19
- const theia_app_loader_1 = require("../theia-app-loader");
20
- const theia_toolbar_1 = require("../theia-toolbar");
21
- let app;
22
- let toolbar;
23
- test_1.test.describe('Theia Toolbar', () => {
24
- test_1.test.beforeAll(async ({ playwright, browser }) => {
25
- app = await theia_app_loader_1.TheiaAppLoader.load({ playwright, browser });
26
- toolbar = new theia_toolbar_1.TheiaToolbar(app);
27
- });
28
- test_1.test.afterAll(async () => {
29
- await app.page.close();
30
- });
31
- (0, test_1.test)('should toggle the toolbar and check visibility', async () => {
32
- // depending on the user settings we have different starting conditions for the toolbar
33
- const isShownInitially = await toolbar.isShown();
34
- (0, test_1.expect)(await toolbar.isShown()).toBe(isShownInitially);
35
- await toolbar.toggle();
36
- (0, test_1.expect)(await toolbar.isShown()).toBe(!isShownInitially);
37
- await toolbar.hide();
38
- (0, test_1.expect)(await toolbar.isShown()).toBe(false);
39
- await toolbar.show();
40
- (0, test_1.expect)(await toolbar.isShown()).toBe(true);
41
- });
42
- (0, test_1.test)('should show the default toolbar tools of the sample Theia application', async () => {
43
- (0, test_1.expect)(await toolbar.toolbarItems()).toHaveLength(5);
44
- (0, test_1.expect)(await toolbar.toolbarItemIds()).toStrictEqual([
45
- 'textEditor.commands.go.back',
46
- 'textEditor.commands.go.forward',
47
- 'workbench.action.splitEditorRight',
48
- 'theia-sample-toolbar-contribution',
49
- 'workbench.action.showCommands'
50
- ]);
51
- });
52
- (0, test_1.test)('should trigger the "Command Palette" toolbar tool as expect the command palette to open', async () => {
53
- const commandPaletteTool = await toolbar.toolBarItem('workbench.action.showCommands');
54
- (0, test_1.expect)(commandPaletteTool).toBeDefined;
55
- (0, test_1.expect)(await commandPaletteTool.isEnabled()).toBe(true);
56
- await commandPaletteTool.trigger();
57
- (0, test_1.expect)(await app.quickCommandPalette.isOpen()).toBe(true);
58
- await app.quickCommandPalette.hide();
59
- (0, test_1.expect)(await app.quickCommandPalette.isOpen()).toBe(false);
60
- });
61
- });
62
- //# sourceMappingURL=theia-toolbar.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-toolbar.test.js","sourceRoot":"","sources":["../../src/tests/theia-toolbar.test.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,uDA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AAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,IAAA,WAAI,EAAC,uEAAuE,EAAE,KAAK,IAAI,EAAE;QACrF,IAAA,aAAM,EAAC,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACrD,IAAA,aAAM,EAAC,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC;YACjD,6BAA6B;YAC7B,gCAAgC;YAChC,mCAAmC;YACnC,mCAAmC;YACnC,+BAA+B;SAClC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,IAAA,WAAI,EAAC,yFAAyF,EAAE,KAAK,IAAI,EAAE;QACvG,MAAM,kBAAkB,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,+BAA+B,CAAC,CAAC;QACtF,IAAA,aAAM,EAAC,kBAAkB,CAAC,CAAC,WAAW,CAAC;QACvC,IAAA,aAAM,EAAC,MAAM,kBAAmB,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEzD,MAAM,kBAAmB,CAAC,OAAO,EAAE,CAAC;QACpC,IAAA,aAAM,EAAC,MAAM,GAAG,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1D,MAAM,GAAG,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;QACrC,IAAA,aAAM,EAAC,MAAM,GAAG,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=theia-workspace.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-workspace.test.d.ts","sourceRoot":"","sources":["../../src/tests/theia-workspace.test.ts"],"names":[],"mappings":""}
@@ -1,77 +0,0 @@
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-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const test_1 = require("@playwright/test");
19
- const path = require("path");
20
- const theia_app_loader_1 = require("../theia-app-loader");
21
- const theia_explorer_view_1 = require("../theia-explorer-view");
22
- const theia_workspace_1 = require("../theia-workspace");
23
- test_1.test.describe('Theia Workspace', () => {
24
- let isElectron;
25
- test_1.test.beforeAll(async ({ playwright, browser }) => {
26
- isElectron = process.env.USE_ELECTRON === 'true';
27
- });
28
- (0, test_1.test)('should be initialized empty by default', async ({ playwright, browser }) => {
29
- if (!isElectron) {
30
- const app = await theia_app_loader_1.TheiaAppLoader.load({ playwright, browser });
31
- const explorer = await app.openView(theia_explorer_view_1.TheiaExplorerView);
32
- const fileStatElements = await explorer.visibleFileStatNodes(theia_explorer_view_1.DOT_FILES_FILTER);
33
- (0, test_1.expect)(fileStatElements.length).toBe(0);
34
- await app.page.close();
35
- }
36
- });
37
- (0, test_1.test)('should be initialized with the contents of a file location', async ({ playwright, browser }) => {
38
- const ws = new theia_workspace_1.TheiaWorkspace([path.resolve(__dirname, '../../src/tests/resources/sample-files1')]);
39
- const app = await theia_app_loader_1.TheiaAppLoader.load({ playwright, browser }, ws);
40
- const explorer = await app.openView(theia_explorer_view_1.TheiaExplorerView);
41
- // resources/sample-files1 contains two folders and one file
42
- (0, test_1.expect)(await explorer.existsDirectoryNode('sampleFolder')).toBe(true);
43
- (0, test_1.expect)(await explorer.existsDirectoryNode('sampleFolderCompact')).toBe(true);
44
- (0, test_1.expect)(await explorer.existsFileNode('sample.txt')).toBe(true);
45
- await app.page.close();
46
- });
47
- (0, test_1.test)('should be initialized with the contents of multiple file locations', async ({ playwright, browser }) => {
48
- const ws = new theia_workspace_1.TheiaWorkspace([
49
- path.resolve(__dirname, '../../src/tests/resources/sample-files1'),
50
- path.resolve(__dirname, '../../src/tests/resources/sample-files2')
51
- ]);
52
- const app = await theia_app_loader_1.TheiaAppLoader.load({ playwright, browser }, ws);
53
- const explorer = await app.openView(theia_explorer_view_1.TheiaExplorerView);
54
- // resources/sample-files1 contains two folders and one file
55
- (0, test_1.expect)(await explorer.existsDirectoryNode('sampleFolder')).toBe(true);
56
- (0, test_1.expect)(await explorer.existsDirectoryNode('sampleFolderCompact')).toBe(true);
57
- (0, test_1.expect)(await explorer.existsFileNode('sample.txt')).toBe(true);
58
- // resources/sample-files2 contains one file
59
- (0, test_1.expect)(await explorer.existsFileNode('another-sample.txt')).toBe(true);
60
- await app.page.close();
61
- });
62
- (0, test_1.test)('open sample.txt via file menu', async ({ playwright, browser }) => {
63
- const ws = new theia_workspace_1.TheiaWorkspace([path.resolve(__dirname, '../../src/tests/resources/sample-files1')]);
64
- const app = await theia_app_loader_1.TheiaAppLoader.load({ playwright, browser }, ws);
65
- const menuEntry = app.isElectron ? 'Open File...' : 'Open...';
66
- await (await app.menuBar.openMenu('File')).clickMenuItem(menuEntry);
67
- const fileDialog = await app.page.waitForSelector('div[class="dialogBlock"]');
68
- (0, test_1.expect)(await fileDialog.isVisible()).toBe(true);
69
- const fileEntry = app.page.getByText('sample.txt');
70
- await fileEntry.click();
71
- await app.page.locator('#theia-dialog-shell').getByRole('button', { name: 'Open' }).click();
72
- const span = await app.page.waitForSelector('span:has-text("content line 2")');
73
- (0, test_1.expect)(await span.isVisible()).toBe(true);
74
- await app.page.close();
75
- });
76
- });
77
- //# sourceMappingURL=theia-workspace.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-workspace.test.js","sourceRoot":"","sources":["../../src/tests/theia-workspace.test.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,2CAAgD;AAChD,6BAA6B;AAC7B,0DAAqD;AACrD,gEAA6E;AAC7E,wDAAoD;AAEpD,WAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAClC,IAAI,UAAmB,CAAC;IACxB,WAAI,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7C,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,MAAM,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,IAAA,WAAI,EAAC,wCAAwC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7E,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,MAAM,GAAG,GAAG,MAAM,iCAAc,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;YAC/D,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,uCAAiB,CAAC,CAAC;YACvD,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CAAC,oBAAoB,CAAC,sCAAgB,CAAC,CAAC;YAC/E,IAAA,aAAM,EAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACxC,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAC3B,CAAC;IACL,CAAC,CAAC,CAAC;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;QAC9E,IAAA,aAAM,EAAC,MAAM,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhD,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACnD,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;QACxB,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QAE5F,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,iCAAiC,CAAC,CAAC;QAC/E,IAAA,aAAM,EAAC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AAEP,CAAC,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { TheiaDialog } from './theia-dialog';
2
- export declare class TheiaAboutDialog extends TheiaDialog {
3
- isVisible(): Promise<boolean>;
4
- }
5
- //# sourceMappingURL=theia-about-dialog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-about-dialog.d.ts","sourceRoot":"","sources":["../src/theia-about-dialog.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,gBAAiB,SAAQ,WAAW;IAE9B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;CAK/C"}
@@ -1,27 +0,0 @@
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-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.TheiaAboutDialog = void 0;
19
- const theia_dialog_1 = require("./theia-dialog");
20
- class TheiaAboutDialog extends theia_dialog_1.TheiaDialog {
21
- async isVisible() {
22
- const dialog = await this.page.$(`${this.blockSelector} .theia-aboutDialog`);
23
- return !!dialog && dialog.isVisible();
24
- }
25
- }
26
- exports.TheiaAboutDialog = TheiaAboutDialog;
27
- //# sourceMappingURL=theia-about-dialog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-about-dialog.js","sourceRoot":"","sources":["../src/theia-about-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;AAE7C,MAAa,gBAAiB,SAAQ,0BAAW;IAEpC,KAAK,CAAC,SAAS;QACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,aAAa,qBAAqB,CAAC,CAAC;QAC7E,OAAO,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;IAC1C,CAAC;CAEJ;AAPD,4CAOC"}
@@ -1,20 +0,0 @@
1
- import { Page, PlaywrightWorkerArgs } from '@playwright/test';
2
- import { TheiaApp } from './theia-app';
3
- import { TheiaWorkspace } from './theia-workspace';
4
- export interface TheiaAppFactory<T extends TheiaApp> {
5
- new (page: Page, initialWorkspace: TheiaWorkspace, isElectron?: boolean): T;
6
- }
7
- export interface TheiaPlaywrightTestConfig {
8
- useElectron?: {
9
- /** Path to the Theia Electron app package (absolute or relative to this package). */
10
- electronAppPath?: string;
11
- /** Path to the folder containing the plugins to load (absolute or relative to this package). */
12
- pluginsPath?: string;
13
- /** Electron launch options as [specified by Playwright](https://github.com/microsoft/playwright/blob/396487fc4c19bf27554eac9beea9db135e96cfb4/packages/playwright-core/types/types.d.ts#L14182). */
14
- launchOptions?: object;
15
- };
16
- }
17
- export declare namespace TheiaAppLoader {
18
- function load<T extends TheiaApp>(args: TheiaPlaywrightTestConfig & PlaywrightWorkerArgs, initialWorkspace?: TheiaWorkspace, factory?: TheiaAppFactory<T>): Promise<T>;
19
- }
20
- //# sourceMappingURL=theia-app-loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-app-loader.d.ts","sourceRoot":"","sources":["../src/theia-app-loader.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAyB,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,QAAQ;IAC/C,KAAI,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,cAAc,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC;CAC9E;AAGD,MAAM,WAAW,yBAAyB;IACtC,WAAW,CAAC,EAAE;QACV,qFAAqF;QACrF,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,gGAAgG;QAChG,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB,oMAAoM;QACpM,aAAa,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAA;CACJ;AA8GD,yBAAiB,cAAc,CAAC;IAE5B,SAAsB,IAAI,CAAC,CAAC,SAAS,QAAQ,EACzC,IAAI,EAAE,yBAAyB,GAAG,oBAAoB,EACtD,gBAAgB,CAAC,EAAE,cAAc,EACjC,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,GAC7B,OAAO,CAAC,CAAC,CAAC,CAUZ;CACJ"}
@@ -1,124 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2022 STMicroelectronics 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
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.TheiaAppLoader = void 0;
19
- const test_1 = require("@playwright/test");
20
- const theia_app_1 = require("./theia-app");
21
- const theia_workspace_1 = require("./theia-workspace");
22
- function theiaAppFactory(factory) {
23
- return (factory !== null && factory !== void 0 ? factory : theia_app_1.TheiaApp);
24
- }
25
- function initializeWorkspace(initialWorkspace) {
26
- const workspace = initialWorkspace ? initialWorkspace : new theia_workspace_1.TheiaWorkspace();
27
- workspace.initialize();
28
- return workspace;
29
- }
30
- var TheiaBrowserAppLoader;
31
- (function (TheiaBrowserAppLoader) {
32
- async function load(page, initialWorkspace, factory) {
33
- const workspace = initializeWorkspace(initialWorkspace);
34
- return createAndLoad(page, workspace, factory);
35
- }
36
- TheiaBrowserAppLoader.load = load;
37
- async function createAndLoad(page, workspace, factory) {
38
- const appFactory = theiaAppFactory(factory);
39
- const app = new appFactory(page, workspace, false);
40
- await loadOrReload(app, '/#' + app.workspace.pathAsPathComponent);
41
- await app.waitForShellAndInitialized();
42
- return app;
43
- }
44
- async function loadOrReload(app, url) {
45
- if (app.page.url() === url) {
46
- await app.page.reload();
47
- }
48
- else {
49
- const wasLoadedAlready = await app.isShellVisible();
50
- await app.page.goto(url);
51
- if (wasLoadedAlready) {
52
- // Theia doesn't refresh on URL change only
53
- // So we need to reload if the app was already loaded before
54
- await app.page.reload();
55
- }
56
- }
57
- }
58
- })(TheiaBrowserAppLoader || (TheiaBrowserAppLoader = {}));
59
- var TheiaElectronAppLoader;
60
- (function (TheiaElectronAppLoader) {
61
- async function load(args, initialWorkspace, factory) {
62
- var _a, _b;
63
- const workspace = initializeWorkspace(initialWorkspace);
64
- const electronConfig = (_a = args.useElectron) !== null && _a !== void 0 ? _a : {
65
- electronAppPath: '../electron',
66
- pluginsPath: '../../plugins'
67
- };
68
- if (electronConfig === undefined || electronConfig.launchOptions === undefined && electronConfig.electronAppPath === undefined) {
69
- throw Error('The Theia Playwright configuration must either specify `useElectron.electronAppPath` or `useElectron.launchOptions`');
70
- }
71
- const appPath = electronConfig.electronAppPath;
72
- const pluginsPath = electronConfig.pluginsPath;
73
- const launchOptions = (_b = electronConfig.launchOptions) !== null && _b !== void 0 ? _b : {
74
- additionalArgs: ['--no-sandbox', '--no-cluster'],
75
- electronAppPath: appPath,
76
- pluginsPath: pluginsPath
77
- };
78
- const playwrightOptions = toPlaywrightOptions(launchOptions, workspace);
79
- console.log(`Launching Electron with options: ${JSON.stringify(playwrightOptions)}`);
80
- const electronApp = await test_1._electron.launch(playwrightOptions);
81
- const page = await electronApp.firstWindow();
82
- const appFactory = theiaAppFactory(factory);
83
- const app = new appFactory(page, workspace, true);
84
- await app.waitForShellAndInitialized();
85
- return app;
86
- }
87
- TheiaElectronAppLoader.load = load;
88
- function toPlaywrightOptions(electronLaunchOptions, workspace) {
89
- if ('additionalArgs' in electronLaunchOptions && 'electronAppPath' in electronLaunchOptions) {
90
- const args = [
91
- electronLaunchOptions.electronAppPath,
92
- ...electronLaunchOptions.additionalArgs,
93
- `--app-project-path=${electronLaunchOptions.electronAppPath}`
94
- ];
95
- if (electronLaunchOptions.pluginsPath) {
96
- args.push(`--plugins=local-dir:${electronLaunchOptions.pluginsPath}`);
97
- }
98
- if (workspace) {
99
- args.push(workspace.path);
100
- }
101
- return {
102
- args: args
103
- };
104
- }
105
- return electronLaunchOptions;
106
- }
107
- TheiaElectronAppLoader.toPlaywrightOptions = toPlaywrightOptions;
108
- })(TheiaElectronAppLoader || (TheiaElectronAppLoader = {}));
109
- var TheiaAppLoader;
110
- (function (TheiaAppLoader) {
111
- async function load(args, initialWorkspace, factory) {
112
- if (process.env.USE_ELECTRON === 'true') {
113
- // disable native elements and early window to avoid issues with the electron app
114
- process.env.THEIA_ELECTRON_DISABLE_NATIVE_ELEMENTS = '1';
115
- process.env.THEIA_ELECTRON_NO_EARLY_WINDOW = '1';
116
- process.env.THEIA_NO_SPLASH = 'true';
117
- return TheiaElectronAppLoader.load(args, initialWorkspace, factory);
118
- }
119
- const page = await args.browser.newPage();
120
- return TheiaBrowserAppLoader.load(page, initialWorkspace, factory);
121
- }
122
- TheiaAppLoader.load = load;
123
- })(TheiaAppLoader || (exports.TheiaAppLoader = TheiaAppLoader = {}));
124
- //# sourceMappingURL=theia-app-loader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-app-loader.js","sourceRoot":"","sources":["../src/theia-app-loader.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;AAChF,gFAAgF;;;AAEhF,2CAAqF;AACrF,2CAAuC;AACvC,uDAAmD;AAmBnD,SAAS,eAAe,CAAqB,OAA4B;IACrE,OAAO,CAAC,OAAO,aAAP,OAAO,cAAP,OA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AG,CAAC;YACjD,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,MAAM,CAAC;YACrC,OAAO,sBAAsB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;QACxE,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC1C,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAdqB,mBAAI,OAczB,CAAA;AACL,CAAC,EAjBgB,cAAc,8BAAd,cAAc,QAiB9B"}
@@ -1,51 +0,0 @@
1
- import { Page } from '@playwright/test';
2
- import { TheiaEditor } from './theia-editor';
3
- import { TheiaMenuBar } from './theia-main-menu';
4
- import { TheiaPreferenceScope, TheiaPreferenceView } from './theia-preference-view';
5
- import { TheiaQuickCommandPalette } from './theia-quick-command-palette';
6
- import { TheiaStatusBar } from './theia-status-bar';
7
- import { TheiaTerminal } from './theia-terminal';
8
- import { TheiaView } from './theia-view';
9
- import { TheiaWorkspace } from './theia-workspace';
10
- export interface TheiaAppData {
11
- loadingSelector: string;
12
- shellSelector: string;
13
- }
14
- export declare const DefaultTheiaAppData: TheiaAppData;
15
- export declare class TheiaApp {
16
- page: Page;
17
- workspace: TheiaWorkspace;
18
- isElectron: boolean;
19
- statusBar: TheiaStatusBar;
20
- quickCommandPalette: TheiaQuickCommandPalette;
21
- menuBar: TheiaMenuBar;
22
- protected appData: TheiaAppData;
23
- constructor(page: Page, workspace: TheiaWorkspace, isElectron: boolean);
24
- protected createStatusBar(): TheiaStatusBar;
25
- protected createQuickCommandPalette(): TheiaQuickCommandPalette;
26
- protected createMenuBar(): TheiaMenuBar;
27
- isShellVisible(): Promise<boolean>;
28
- waitForShellAndInitialized(): Promise<void>;
29
- isMainContentPanelVisible(): Promise<boolean>;
30
- openPreferences(viewFactory: {
31
- new (app: TheiaApp): TheiaPreferenceView;
32
- }, preferenceScope?: TheiaPreferenceScope): Promise<TheiaPreferenceView>;
33
- openView<T extends TheiaView>(viewFactory: {
34
- new (app: TheiaApp): T;
35
- }): Promise<T>;
36
- openEditor<T extends TheiaEditor>(filePath: string, editorFactory: {
37
- new (fp: string, app: TheiaApp): T;
38
- }, editorName?: string, expectFileNodes?: boolean): Promise<T>;
39
- activateExistingEditor<T extends TheiaEditor>(filePath: string, editorFactory: {
40
- new (fp: string, app: TheiaApp): T;
41
- }): Promise<T>;
42
- openTerminal<T extends TheiaTerminal>(terminalFactory: {
43
- new (id: string, app: TheiaApp): T;
44
- }): Promise<T>;
45
- protected runAndWaitForNewTabs(command: () => Promise<void>): Promise<string[]>;
46
- protected waitForNewTabs(tabIds: string[]): Promise<string[]>;
47
- protected visibleTabIds(): Promise<string[]>;
48
- /** Specific Theia apps may add additional conditions to wait for. */
49
- waitForInitialized(): Promise<void>;
50
- }
51
- //# sourceMappingURL=theia-app.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"theia-app.d.ts","sourceRoot":"","sources":["../src/theia-app.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,YAAY;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,M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