Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions packages/vscode-extension/src/registrationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,18 @@ export function registerDisposables(): Disposable[] {
const queryDetailsProvider = new Neo4jQueryDetailsProvider();
const queryVisualizationProvider = new Neo4jQueryVisualizationProvider();
const renderBottomPanel = async (statements: string[]) => {
await commands.executeCommand('neo4jQueryDetails.focus');
await commands.executeCommand('neo4jQueryVisualization.focus');
try {
await commands.executeCommand('neo4jQueryDetails.open', {
preserveFocus: true,
});
await commands.executeCommand('neo4jQueryVisualization.open', {
preserveFocus: true,
});
} catch (e) {
/* no-op */
//If a user (or a test framework) has an old version of vscode, <webview>.open won't exist
//A user can still open the webview manually, so we prefer not to remove focus from the editor
}
await queryVisualizationProvider.viewReadyPromise;
await queryDetailsProvider.executeStatements(statements);
};
Expand Down
5 changes: 2 additions & 3 deletions packages/vscode-extension/tests/specs/webviews/params.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ suite('Params panel testing', () => {

before(async () => {
workbench = await browser.getWorkbench();
await workbench.executeCommand(
'Query Results: Focus on Query Details View',
);
await workbench.executeCommand('neo4jQueryDetails.focus');
await workbench.executeCommand('neo4jQueryVisualization.focus');
});

async function escapeModal(count: number) {
Expand Down