@theia/api-tests 1.45.0 → 1.46.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.45.0",
3
+ "version": "1.46.0",
4
4
  "description": "Theia API tests",
5
5
  "dependencies": {
6
- "@theia/core": "1.45.0"
6
+ "@theia/core": "1.46.0"
7
7
  },
8
8
  "license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
9
9
  "repository": {
@@ -20,5 +20,5 @@
20
20
  "publishConfig": {
21
21
  "access": "public"
22
22
  },
23
- "gitHead": "2b20a60a0f9b54b19838a0f71760989a19622495"
23
+ "gitHead": "90ba9de68f5912773ae9e26fcffeb671c0ab43d2"
24
24
  }
@@ -19,6 +19,7 @@ describe('TypeScript', function () {
19
19
  this.timeout(30_000);
20
20
 
21
21
  const { assert } = chai;
22
+ const { timeout } = require('@theia/core/lib/common/promise-util');
22
23
 
23
24
  const Uri = require('@theia/core/lib/common/uri');
24
25
  const { DisposableCollection } = require('@theia/core/lib/common/disposable');
@@ -700,9 +701,7 @@ SPAN {
700
701
  return !!node && node.style.visibility !== 'hidden';
701
702
  };
702
703
 
703
- assert.isFalse(lightBulbVisible(), 'Failed at assert 2');
704
- await waitForAnimation(() => lightBulbVisible());
705
-
704
+ await timeout(1000); // quick fix is always available: need to wait for the error fix to become available.
706
705
  await commands.executeCommand('editor.action.quickFix');
707
706
  const codeActionSelector = '.codeActionWidget';
708
707
  assert.isFalse(!!document.querySelector(codeActionSelector), 'Failed at assert 3 - codeActionWidget should not be visible');
@@ -721,20 +720,9 @@ SPAN {
721
720
  assert.isTrue(lightBulbVisible(), 'Failed at assert 4');
722
721
  keybindings.dispatchKeyDown('Enter');
723
722
  console.log('Waiting for confirmation that QuickFix has taken effect');
724
- await waitForAnimation(() => {
725
- const quickFixHasTakenEffect = !lightBulbVisible();
726
- if (!quickFixHasTakenEffect) {
727
- console.log('...');
728
- return false;
729
- }
730
- return true;
731
- }, 5000, 'Quickfix widget has not been dismissed despite attempts to accept suggestion');
732
723
 
733
- await waitForAnimation(() => currentChar() === 'd', 5000, 'Failed to detect expected selected char: "d"');
724
+ await waitForAnimation(() => currentChar() === 'd', 10000, 'Failed to detect expected selected char: "d"');
734
725
  assert.equal(currentChar(), 'd', 'Failed at assert 5');
735
-
736
- await waitForAnimation(() => !lightBulbVisible());
737
- assert.isFalse(lightBulbVisible(), 'Failed at assert 6');
738
726
  });
739
727
 
740
728
  it('editor.action.formatDocument', async function () {