@theia/api-tests 1.32.0-next.8 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@theia/api-tests",
3
- "version": "1.32.0-next.8+d109bc9ae",
3
+ "version": "1.32.0",
4
4
  "description": "Theia API tests",
5
5
  "dependencies": {
6
- "@theia/core": "1.32.0-next.8+d109bc9ae"
6
+ "@theia/core": "1.32.0"
7
7
  },
8
8
  "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
9
9
  "repository": {
@@ -20,5 +20,5 @@
20
20
  "publishConfig": {
21
21
  "access": "public"
22
22
  },
23
- "gitHead": "d109bc9ae3e00c22902fe1e92d6d2882970e1129"
23
+ "gitHead": "789d0148748b4dc9dea398520b5a3dd2998d71ec"
24
24
  }
@@ -644,10 +644,10 @@ SPAN {
644
644
  editor.getControl().revealPosition({ lineNumber, column });
645
645
  assert.equal(currentChar(), ';');
646
646
 
647
- /** @type {import('@theia/monaco-editor-core/src/vs/editor/contrib/codeAction/browser/codeActionCommands').QuickFixController} */
648
- const quickFixController = editor.getControl().getContribution('editor.contrib.quickFixController');
647
+ /** @type {import('@theia/monaco-editor-core/src/vs/editor/contrib/codeAction/browser/codeActionCommands').CodeActionController} */
648
+ const codeActionController = editor.getControl().getContribution('editor.contrib.codeActionController');
649
649
  const lightBulbNode = () => {
650
- const ui = quickFixController['_ui'].rawValue;
650
+ const ui = codeActionController['_ui'].rawValue;
651
651
  const lightBulb = ui && ui['_lightBulbWidget'].rawValue;
652
652
  return lightBulb && lightBulb['_domNode'];
653
653
  };
@@ -660,10 +660,12 @@ SPAN {
660
660
  await waitForAnimation(() => lightBulbVisible());
661
661
 
662
662
  await commands.executeCommand('editor.action.quickFix');
663
- await waitForAnimation(() => !!document.querySelector('.p-Widget.p-Menu'), 5000);
663
+ const codeActionSelector = '.codeActionWidget';
664
+ assert.isFalse(!!document.querySelector(codeActionSelector), 'codeActionWidget should not be visible');
665
+
666
+ await waitForAnimation(() => !!document.querySelector(codeActionSelector), 5000);
664
667
  await animationFrame();
665
668
 
666
- keybindings.dispatchKeyDown('ArrowDown');
667
669
  keybindings.dispatchKeyDown('Enter');
668
670
 
669
671
  await waitForAnimation(() => currentChar() === 'd', 5000);
@@ -737,10 +739,10 @@ SPAN {
737
739
 
738
740
  it('Can execute code actions', async function () {
739
741
  const editor = await openEditor(demoFileUri);
740
- /** @type {import('@theia/monaco-editor-core/src/vs/editor/contrib/codeAction/browser/codeActionCommands').QuickFixController} */
741
- const quickFixController = editor.getControl().getContribution('editor.contrib.quickFixController');
742
+ /** @type {import('@theia/monaco-editor-core/src/vs/editor/contrib/codeAction/browser/codeActionCommands').CodeActionController} */
743
+ const codeActionController = editor.getControl().getContribution('editor.contrib.codeActionController');
742
744
  const isActionAvailable = () => {
743
- const lightbulbVisibility = quickFixController['_ui'].rawValue?.['_lightBulbWidget'].rawValue?.['_domNode'].style.visibility;
745
+ const lightbulbVisibility = codeActionController['_ui'].rawValue?.['_lightBulbWidget'].rawValue?.['_domNode'].style.visibility;
744
746
  return lightbulbVisibility !== undefined && lightbulbVisibility !== 'hidden';
745
747
  }
746
748
  assert.isFalse(isActionAvailable());
@@ -752,12 +754,14 @@ SPAN {
752
754
  assert.isTrue(isActionAvailable());
753
755
 
754
756
  await commands.executeCommand('editor.action.quickFix');
755
- await waitForAnimation(() => Boolean(document.querySelector('.p-Widget.p-Menu')), 5000, 'No context menu appeared. (1)');
757
+ await waitForAnimation(() => Boolean(document.querySelector('.context-view-pointerBlock')), 5000, 'No context menu appeared. (1)');
756
758
  await animationFrame();
757
759
 
758
- keybindings.dispatchKeyDown('ArrowDown');
759
760
  keybindings.dispatchKeyDown('Enter');
760
761
 
762
+ assert.isNotNull(editor.getControl());
763
+ assert.isNotNull(editor.getControl().getModel());
764
+ console.log(`content: ${editor.getControl().getModel().getLineContent(30)}`);
761
765
  await waitForAnimation(() => editor.getControl().getModel().getLineContent(30) === 'import * as demoDefinitionsFile from "./demo-definitions-file";', 5000, 'The namespace import did not take effect.');
762
766
 
763
767
  editor.getControl().setSelection(new Selection(30, 1, 30, 64));
@@ -765,10 +769,9 @@ SPAN {
765
769
 
766
770
  // Change it back: https://github.com/eclipse-theia/theia/issues/11059
767
771
  await commands.executeCommand('editor.action.quickFix');
768
- await waitForAnimation(() => Boolean(document.querySelector('.p-Widget.p-Menu')), 5000, 'No context menu appeared. (2)');
772
+ await waitForAnimation(() => Boolean(document.querySelector('.context-view-pointerBlock')), 5000, 'No context menu appeared. (2)');
769
773
  await animationFrame();
770
774
 
771
- keybindings.dispatchKeyDown('ArrowDown');
772
775
  keybindings.dispatchKeyDown('Enter');
773
776
 
774
777
  await waitForAnimation(() => editor.getControl().getModel().getLineContent(30) === 'import { DefinedInterface } from "./demo-definitions-file";', 5000, 'The named import did not take effect.');