mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 04:36:23 +00:00
@@ -15,9 +15,6 @@ function workspaceFile(...segments: string[]) {
|
||||
return vscode.Uri.joinPath(vscode.workspace.workspaceFolders![0].uri, ...segments);
|
||||
}
|
||||
|
||||
const testDocument = workspaceFile('bower.json');
|
||||
|
||||
|
||||
suite('vscode API - webview', () => {
|
||||
const disposables: vscode.Disposable[] = [];
|
||||
|
||||
@@ -117,7 +114,7 @@ suite('vscode API - webview', () => {
|
||||
assert.strictEqual(firstResponse.value, 1);
|
||||
|
||||
// Swap away from the webview
|
||||
const doc = await vscode.workspace.openTextDocument(testDocument);
|
||||
const doc = await vscode.workspace.openTextDocument(workspaceFile('bower.json'));
|
||||
await vscode.window.showTextDocument(doc);
|
||||
|
||||
// And then back
|
||||
@@ -131,7 +128,7 @@ suite('vscode API - webview', () => {
|
||||
});
|
||||
|
||||
test.skip('webviews should preserve their context when they are moved between view columns', async () => { // TODO@mjbvz https://github.com/microsoft/vscode/issues/141001
|
||||
const doc = await vscode.workspace.openTextDocument(testDocument);
|
||||
const doc = await vscode.workspace.openTextDocument(workspaceFile('bower.json'));
|
||||
await vscode.window.showTextDocument(doc, vscode.ViewColumn.One);
|
||||
|
||||
// Open webview in same column
|
||||
@@ -164,7 +161,7 @@ suite('vscode API - webview', () => {
|
||||
assert.strictEqual((await firstResponse).value, 1);
|
||||
|
||||
// Swap away from the webview
|
||||
const doc = await vscode.workspace.openTextDocument(testDocument);
|
||||
const doc = await vscode.workspace.openTextDocument(workspaceFile('bower.json'));
|
||||
await vscode.window.showTextDocument(doc);
|
||||
|
||||
// And then back
|
||||
@@ -204,7 +201,7 @@ suite('vscode API - webview', () => {
|
||||
assert.strictEqual(Math.round((await firstResponse).value), 100);
|
||||
|
||||
// Swap away from the webview
|
||||
const doc = await vscode.workspace.openTextDocument(testDocument);
|
||||
const doc = await vscode.workspace.openTextDocument(workspaceFile('bower.json'));
|
||||
await vscode.window.showTextDocument(doc);
|
||||
|
||||
// And then back
|
||||
@@ -226,7 +223,7 @@ suite('vscode API - webview', () => {
|
||||
assert.strictEqual((await firstResponse).value, 1);
|
||||
|
||||
// Swap away from the webview
|
||||
const doc = await vscode.workspace.openTextDocument(testDocument);
|
||||
const doc = await vscode.workspace.openTextDocument(workspaceFile('bower.json'));
|
||||
await vscode.window.showTextDocument(doc);
|
||||
|
||||
// Try posting a message to our hidden webview
|
||||
|
||||
Reference in New Issue
Block a user