mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 (#12295)
* Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 * Fix test build break * Update distro * Fix build errors * Update distro * Update REH build file * Update build task names for REL * Fix product build yaml * Fix product REH task name * Fix type in task name * Update linux build step * Update windows build tasks * Turn off server publish * Disable REH * Fix typo * Bump distro * Update vscode tests * Bump distro * Fix type in disto * Bump distro * Turn off docker build * Remove docker step from release Co-authored-by: ADS Merger <andresse@microsoft.com> Co-authored-by: Karl Burtram <karlb@microsoft.com>
This commit is contained in:
@@ -24,7 +24,6 @@ import { TreeNodeContextKey } from 'sql/workbench/services/objectExplorer/common
|
||||
import { IQueryManagementService } from 'sql/workbench/services/query/common/queryManagement';
|
||||
import { ServerInfoContextKey } from 'sql/workbench/services/connection/common/serverInfoContextKey';
|
||||
import { fillInActions } from 'vs/platform/actions/browser/menuEntryActionViewItem';
|
||||
import { firstIndex, find } from 'vs/base/common/arrays';
|
||||
import { AsyncServerTree, ServerTreeElement } from 'sql/workbench/services/objectExplorer/browser/asyncServerTree';
|
||||
|
||||
/**
|
||||
@@ -87,7 +86,7 @@ export class ServerTreeActionProvider {
|
||||
const options = { arg: undefined, shouldForwardArgs: true };
|
||||
const groups = menu.getActions(options);
|
||||
let insertIndex: number | undefined = 0;
|
||||
const queryIndex = firstIndex(groups, v => {
|
||||
const queryIndex = groups.findIndex(v => {
|
||||
if (v[0] === '0_query') {
|
||||
return true;
|
||||
} else {
|
||||
@@ -193,7 +192,7 @@ export class ServerTreeActionProvider {
|
||||
|
||||
private isScriptableObject(context: ObjectExplorerContext): boolean {
|
||||
if (context.treeNode) {
|
||||
if (find(NodeType.SCRIPTABLE_OBJECTS, x => x === context?.treeNode?.nodeTypeId)) {
|
||||
if (NodeType.SCRIPTABLE_OBJECTS.find(x => x === context?.treeNode?.nodeTypeId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import { NullLogService } from 'vs/platform/log/common/log';
|
||||
import { TestObjectExplorerProvider } from 'sql/workbench/services/objectExplorer/test/common/testObjectExplorerProvider';
|
||||
import { TestConnectionManagementService } from 'sql/platform/connection/test/common/testConnectionManagementService';
|
||||
import { TestCapabilitiesService } from 'sql/platform/capabilities/test/common/testCapabilitiesService';
|
||||
import { find } from 'vs/base/common/arrays';
|
||||
import { NullAdsTelemetryService } from 'sql/platform/telemetry/common/adsTelemetryService';
|
||||
import { ConnectionOptionSpecialType, ServiceOptionType } from 'sql/platform/connection/common/interfaces';
|
||||
|
||||
@@ -495,7 +494,7 @@ suite('SQL Object Explorer Service tests', () => {
|
||||
sqlOEProvider.setup(x => x.expandNode(TypeMoq.It.isAny())).callback(() => {
|
||||
objectExplorerService.onNodeExpanded(tableExpandInfo);
|
||||
}).returns(() => Promise.resolve(true));
|
||||
const tableNode = find(childNodes, node => node.nodePath === table1NodePath);
|
||||
const tableNode = childNodes.find(node => node.nodePath === table1NodePath);
|
||||
await objectExplorerService.resolveTreeNodeChildren(objectExplorerSession, tableNode);
|
||||
const isExpanded = await tableNode.isExpanded();
|
||||
assert.equal(isExpanded, true, 'Table node was not expanded');
|
||||
@@ -511,7 +510,7 @@ suite('SQL Object Explorer Service tests', () => {
|
||||
objectExplorerService.onSessionCreated(1, objectExplorerSession);
|
||||
const childNodes = await objectExplorerService.resolveTreeNodeChildren(objectExplorerSession, objectExplorerService.getObjectExplorerNode(connection));
|
||||
// If I check whether the table is expanded, the answer should be no because only its parent node is expanded
|
||||
const tableNode = find(childNodes, node => node.nodePath === table1NodePath);
|
||||
const tableNode = childNodes.find(node => node.nodePath === table1NodePath);
|
||||
const isExpanded = await tableNode.isExpanded();
|
||||
assert.equal(isExpanded, false);
|
||||
});
|
||||
@@ -535,9 +534,9 @@ suite('SQL Object Explorer Service tests', () => {
|
||||
sqlOEProvider.setup(x => x.expandNode(TypeMoq.It.isAny())).callback(() => {
|
||||
objectExplorerService.onNodeExpanded(tableExpandInfo);
|
||||
}).returns(() => Promise.resolve(true));
|
||||
await objectExplorerService.resolveTreeNodeChildren(objectExplorerSession, find(childNodes, node => node.nodePath === table1NodePath));
|
||||
await objectExplorerService.resolveTreeNodeChildren(objectExplorerSession, childNodes.find(node => node.nodePath === table1NodePath));
|
||||
// If I check whether the table is expanded, the answer should be yes
|
||||
const tableNode = find(childNodes, node => node.nodePath === table1NodePath);
|
||||
const tableNode = childNodes.find(node => node.nodePath === table1NodePath);
|
||||
const isExpanded = await tableNode.isExpanded();
|
||||
assert.equal(isExpanded, false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user