Revert "Enable webview tests (#114059)"

This reverts commit 01c6003c29.
This commit is contained in:
Benjamin Pasero
2021-01-09 11:23:34 +01:00
parent 0a3a9ce7bb
commit 6bd7b70515
2 changed files with 4 additions and 20 deletions

View File

@@ -7,7 +7,7 @@ import * as assert from 'assert';
import 'mocha';
import * as os from 'os';
import * as vscode from 'vscode';
import { closeAllEditors, delay, disposeAll, flakySuite } from '../utils';
import { closeAllEditors, delay, disposeAll } from '../utils';
const webviewId = 'myWebview';
@@ -17,7 +17,7 @@ function workspaceFile(...segments: string[]) {
const testDocument = workspaceFile('bower.json');
flakySuite('vscode API - webview', () => {
suite.skip('vscode API - webview', () => {
const disposables: vscode.Disposable[] = [];
function _register<T extends vscode.Disposable>(disposable: T) {
@@ -212,7 +212,7 @@ flakySuite('vscode API - webview', () => {
assert.strictEqual(Math.round(secondResponse.value), 100);
});
test('webviews with retainContextWhenHidden should be able to receive messages while hidden', async () => {
test('webviews with retainContextWhenHidden should be able to recive messages while hidden', async () => {
const webview = _register(vscode.window.createWebviewPanel(webviewId, 'title', { viewColumn: vscode.ViewColumn.One }, { enableScripts: true, retainContextWhenHidden: true }));
const ready = getMesssage(webview);

View File

@@ -3,25 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { Suite } from 'mocha';
import * as vscode from 'vscode';
import { TestFS } from './memfs';
export function flakySuite(title: string, fn: (this: Suite) => void): Suite {
return suite(title, function () {
// Flaky suites need retries and timeout to complete
// e.g. because they access the file system which can
// be unreliable depending on the environment.
this.retries(3);
this.timeout(1000 * 20);
// Invoke suite ensuring that `this` is
// properly wired in.
fn.call(this);
});
}
import * as assert from 'assert';
export function rndName() {
return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10);