mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 01:25:36 -05:00
fix menu item not showing up for non-English languages (#20224)
* new object type property * vbump sts * fix azure tree * mark as optional * Fix test errors
This commit is contained in:
@@ -80,8 +80,8 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
let objectExplorerService = TypeMoq.Mock.ofType(ObjectExplorerService, TypeMoq.MockBehavior.Strict, connectionManagementService);
|
||||
objectExplorerService.callBase = true;
|
||||
objectExplorerService.setup(x => x.getTreeNode(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => Promise.resolve(getTreeNodeReturnVal));
|
||||
objectExplorerService.setup(x => x.getObjectExplorerNode(TypeMoq.It.isAny())).returns(() => new TreeNode('', '', false, '', '', '', undefined, undefined, undefined, undefined));
|
||||
objectExplorerService.setup(x => x.getObjectExplorerNode(undefined)).returns(() => new TreeNode('', '', false, '', '', '', undefined, undefined, undefined, undefined));
|
||||
objectExplorerService.setup(x => x.getObjectExplorerNode(TypeMoq.It.isAny())).returns(() => new TreeNode('', '', '', false, '', '', '', undefined, undefined, undefined, undefined));
|
||||
objectExplorerService.setup(x => x.getObjectExplorerNode(undefined)).returns(() => new TreeNode('', '', '', false, '', '', '', undefined, undefined, undefined, undefined));
|
||||
objectExplorerService.setup(x => x.onUpdateObjectExplorerNodes).returns(() => new Emitter<ObjectExplorerNodeEventArgs>().event);
|
||||
|
||||
objectExplorerService.setup(x => x.onUpdateObjectExplorerNodes).returns(() => new Emitter<ObjectExplorerNodeEventArgs>().event);
|
||||
@@ -192,7 +192,7 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
saveProfile: true,
|
||||
id: 'testId'
|
||||
});
|
||||
let treeNode = new TreeNode(NodeType.Database, 'db node', false, '', '', '', undefined, undefined, undefined, undefined);
|
||||
let treeNode = new TreeNode(NodeType.Database, '', 'db node', false, '', '', '', undefined, undefined, undefined, undefined);
|
||||
treeNode.connection = connection;
|
||||
let connectionManagementService = createConnectionManagementService(isConnectedReturnValue, connection);
|
||||
let objectExplorerService = createObjectExplorerService(connectionManagementService.object, treeNode);
|
||||
@@ -409,6 +409,7 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
rootNode: {
|
||||
nodePath: 'testServerName\tables',
|
||||
nodeType: NodeType.Folder,
|
||||
objectType: '',
|
||||
label: 'Tables',
|
||||
isLeaf: false,
|
||||
metadata: null,
|
||||
@@ -419,11 +420,11 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
errorMessage: ''
|
||||
};
|
||||
|
||||
let tablesNode = new TreeNode(NodeType.Folder, 'Tables', false, 'testServerName\Db1\tables', '', '', null, null, undefined, undefined);
|
||||
let tablesNode = new TreeNode(NodeType.Folder, '', 'Tables', false, 'testServerName\Db1\tables', '', '', null, null, undefined, undefined);
|
||||
tablesNode.connection = connection;
|
||||
tablesNode.session = objectExplorerSession;
|
||||
let table1Node = new TreeNode(NodeType.Table, 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table2Node = new TreeNode(NodeType.Table, 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table1Node = new TreeNode(NodeType.Table, '', 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table2Node = new TreeNode(NodeType.Table, '', 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
tablesNode.children = [table1Node, table2Node];
|
||||
let objectExplorerService = TypeMoq.Mock.ofType(ObjectExplorerService, TypeMoq.MockBehavior.Loose, connectionManagementService.object);
|
||||
objectExplorerService.callBase = true;
|
||||
@@ -495,6 +496,7 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
rootNode: {
|
||||
nodePath: 'testServerName\tables',
|
||||
nodeType: NodeType.Folder,
|
||||
objectType: '',
|
||||
label: 'Tables',
|
||||
isLeaf: false,
|
||||
metadata: null,
|
||||
@@ -505,11 +507,11 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
errorMessage: ''
|
||||
};
|
||||
|
||||
let tablesNode = new TreeNode(NodeType.Folder, 'Tables', false, 'testServerName\Db1\tables', '', '', null, null, undefined, undefined);
|
||||
let tablesNode = new TreeNode(NodeType.Folder, '', 'Tables', false, 'testServerName\Db1\tables', '', '', null, null, undefined, undefined);
|
||||
tablesNode.connection = connection;
|
||||
tablesNode.session = objectExplorerSession;
|
||||
let table1Node = new TreeNode(NodeType.Table, 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table2Node = new TreeNode(NodeType.Table, 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table1Node = new TreeNode(NodeType.Table, '', 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table2Node = new TreeNode(NodeType.Table, '', 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
tablesNode.children = [table1Node, table2Node];
|
||||
let objectExplorerService = TypeMoq.Mock.ofType(ObjectExplorerService, TypeMoq.MockBehavior.Loose, connectionManagementService.object);
|
||||
objectExplorerService.callBase = true;
|
||||
@@ -582,6 +584,7 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
rootNode: {
|
||||
nodePath: 'testServerName\tables',
|
||||
nodeType: NodeType.Folder,
|
||||
objectType: '',
|
||||
label: 'Tables',
|
||||
isLeaf: false,
|
||||
metadata: null,
|
||||
@@ -592,11 +595,11 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
errorMessage: ''
|
||||
};
|
||||
|
||||
let tablesNode = new TreeNode(NodeType.Folder, 'Tables', false, 'testServerName\Db1\tables', '', '', null, null, undefined, undefined);
|
||||
let tablesNode = new TreeNode(NodeType.Folder, '', 'Tables', false, 'testServerName\Db1\tables', '', '', null, null, undefined, undefined);
|
||||
tablesNode.connection = connection;
|
||||
tablesNode.session = objectExplorerSession;
|
||||
let table1Node = new TreeNode(NodeType.Table, 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table2Node = new TreeNode(NodeType.Table, 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table1Node = new TreeNode(NodeType.Table, '', 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table2Node = new TreeNode(NodeType.Table, '', 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
tablesNode.children = [table1Node, table2Node];
|
||||
let objectExplorerService = TypeMoq.Mock.ofType(ObjectExplorerService, TypeMoq.MockBehavior.Loose, connectionManagementService.object);
|
||||
objectExplorerService.callBase = true;
|
||||
@@ -678,6 +681,7 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
rootNode: {
|
||||
nodePath: 'testServerName\tables',
|
||||
nodeType: NodeType.Folder,
|
||||
objectType: '',
|
||||
label: 'Tables',
|
||||
isLeaf: false,
|
||||
metadata: null,
|
||||
@@ -688,11 +692,11 @@ suite('SQL Connection Tree Action tests', () => {
|
||||
errorMessage: ''
|
||||
};
|
||||
|
||||
let tablesNode = new TreeNode(NodeType.Folder, 'Tables', false, 'testServerName\Db1\tables', '', '', null, null, undefined, undefined);
|
||||
let tablesNode = new TreeNode(NodeType.Folder, '', 'Tables', false, 'testServerName\Db1\tables', '', '', null, null, undefined, undefined);
|
||||
tablesNode.connection = connection;
|
||||
tablesNode.session = objectExplorerSession;
|
||||
let table1Node = new TreeNode(NodeType.Table, 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table2Node = new TreeNode(NodeType.Table, 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table1Node = new TreeNode(NodeType.Table, '', 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
let table2Node = new TreeNode(NodeType.Table, '', 'dbo.Table1', false, 'testServerName\tables\dbo.Table1', '', '', tablesNode, null, undefined, undefined);
|
||||
tablesNode.children = [table1Node, table2Node];
|
||||
let objectExplorerService = TypeMoq.Mock.ofType(ObjectExplorerService, TypeMoq.MockBehavior.Loose, connectionManagementService.object);
|
||||
objectExplorerService.callBase = true;
|
||||
|
||||
Reference in New Issue
Block a user