From 121372daa6435cd6e22add69819ddb4312159564 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Thu, 30 Jan 2025 14:45:31 +0100 Subject: [PATCH 1/2] Close sidebar when running vscode tests --- packages/vscode-common/src/testUtil/openNewEditor.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/vscode-common/src/testUtil/openNewEditor.ts b/packages/vscode-common/src/testUtil/openNewEditor.ts index 35d369be85..cc50e67cc7 100644 --- a/packages/vscode-common/src/testUtil/openNewEditor.ts +++ b/packages/vscode-common/src/testUtil/openNewEditor.ts @@ -33,6 +33,9 @@ export async function openNewEditor( await editor.edit((editBuilder) => editBuilder.setEndOfLine(eol)); } + // Many times running these tests the sidebar will be opened so we close it. + vscode.commands.executeCommand("workbench.action.closeSidebar"); + return editor; } From 7351720ca885c01bc2c412601568afad2c831297 Mon Sep 17 00:00:00 2001 From: Phil Cohen Date: Thu, 30 Jan 2025 08:05:13 -0800 Subject: [PATCH 2/2] Update packages/vscode-common/src/testUtil/openNewEditor.ts --- packages/vscode-common/src/testUtil/openNewEditor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vscode-common/src/testUtil/openNewEditor.ts b/packages/vscode-common/src/testUtil/openNewEditor.ts index cc50e67cc7..57ddcbf944 100644 --- a/packages/vscode-common/src/testUtil/openNewEditor.ts +++ b/packages/vscode-common/src/testUtil/openNewEditor.ts @@ -33,7 +33,7 @@ export async function openNewEditor( await editor.edit((editBuilder) => editBuilder.setEndOfLine(eol)); } - // Many times running these tests the sidebar will be opened so we close it. + // Many times running these tests opens the sidebar, which slows performance. Close it. vscode.commands.executeCommand("workbench.action.closeSidebar"); return editor;