Can I use this to test whether the panel's (BottomBarPanel) debug console view is visible? #1536
-
I'm updating my extension to conditionally open or close the debug console in the panel, but I can't seem to test for that programmatically. I've looked through the code and samples and I haven't found any way to test for panel visibility using this tool or VS Code's native API. Am I missing something? For example, to test whether the output view is open, I run: vscode.window.visibleTextEditors.some(
(editor) => editor.document.uri.scheme === 'output',
) This comes from the VS Code docs: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1abf76892b6e171ea60ad2180ac3cd40fd01d1f6/types/vscode/index.d.ts#L11108-L11109 However, the debug console does not appear to be an editor, and I'm at a loss for how to test for its visibility. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello, using ExTester you can achieve that by writing simple Ui test for checking the debug console is opened (visible). see our example extension with tests which would be similar to - https://github.com/redhat-developer/vscode-extension-tester/blob/main/examples/helloworld-extester/src/ui-test/bottomBar.test.ts#L139 also you can find the documentation for Debug Console View API here - https://github.com/redhat-developer/vscode-extension-tester/wiki/DebugConsoleView |
Beta Was this translation helpful? Give feedback.
Hello, using ExTester you can achieve that by writing simple Ui test for checking the debug console is opened (visible).
see our example extension with tests which would be similar to - https://github.com/redhat-developer/vscode-extension-tester/blob/main/examples/helloworld-extester/src/ui-test/bottomBar.test.ts#L139
also you can find the documentation for Debug Console View API here - https://github.com/redhat-developer/vscode-extension-tester/wiki/DebugConsoleView