Revert "Merge from vscode merge-base (#22769)" (#22779)

This reverts commit 6bd0a17d3c.
This commit is contained in:
Karl Burtram
2023-04-18 21:44:05 -07:00
committed by GitHub
parent 6bd0a17d3c
commit 47a1745180
2389 changed files with 42588 additions and 92170 deletions

View File

@@ -44,7 +44,6 @@ import { IEditorService } from 'vs/workbench/services/editor/common/editorServic
import { TestDialogService } from 'vs/platform/dialogs/test/common/testDialogService';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import { workbenchTreeDataPreamble } from 'vs/platform/list/browser/listService';
suite('SQL Connection Tree Action tests', () => {
let errorMessageService: TypeMoq.Mock<TestErrorMessageService>;
@@ -707,16 +706,7 @@ suite('SQL Connection Tree Action tests', () => {
});
});
/*
TypeError: instantiationService.invokeFunction is not a function
at new WorkbenchAsyncDataTree (file:///C:/Users/lewissanchez/GitProjects/azuredatastudio-merge/out/vs/platform/list/browser/listService.js:643:102)
at new AsyncServerTree (file:///C:/Users/lewissanchez/GitProjects/azuredatastudio-merge/out/sql/workbench/services/objectExplorer/browser/asyncServerTree.js:9:5)
at Utils.conthunktor (C:\Users\lewissanchez\GitProjects\azuredatastudio-merge\node_modules\typemoq\typemoq.js:227:23)
at Mock.ofType2 (C:\Users\lewissanchez\GitProjects\azuredatastudio-merge\node_modules\typemoq\typemoq.js:1248:48)
at Mock.ofType (C:\Users\lewissanchez\GitProjects\azuredatastudio-merge\node_modules\typemoq\typemoq.js:1243:29)
at Context.<anonymous> (file:///C:/Users/lewissanchez/GitProjects/azuredatastudio-merge/out/sql/workbench/contrib/objectExplorer/test/browser/connectionTreeActions.test.js:612:
*/
test.skip('RefreshConnectionAction - AsyncServerTree - refresh should not be called if connection status is not connect', (done) => { // {{SQL CARBON TODO}} 3/17/23 Not sure why this is failing after mokcing the instantiation service's invoke function.
test('RefreshConnectionAction - AsyncServerTree - refresh should not be called if connection status is not connect', () => {
let isConnectedReturnValue: boolean = false;
let sqlProvider = {
providerId: mssqlProviderName,
@@ -780,24 +770,6 @@ suite('SQL Connection Tree Action tests', () => {
objectExplorerService.callBase = true;
objectExplorerService.setup(x => x.getObjectExplorerNode(TypeMoq.It.isAny())).returns(() => tablesNode);
objectExplorerService.setup(x => x.refreshTreeNode(TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => Promise.resolve([table1Node, table2Node]));
let testDisposable = {
dispose() {
//
}
};
let testInstantiationService = TypeMoq.Mock.ofType(InstantiationService, TypeMoq.MockBehavior.Loose);
testInstantiationService.setup(x => x.invokeFunction(workbenchTreeDataPreamble, TypeMoq.It.isAny())).returns((): any => {
return {
getTypeNavigationMode: undefined,
disposable: testDisposable,
treeOptions: {}
};
});
let mockContextKeyService = new MockContextKeyService();
let testListService = new TestListService();
let testConfigurationService = new TestConfigurationService();
let tree = TypeMoq.Mock.ofType<AsyncServerTree>(AsyncServerTree, TypeMoq.MockBehavior.Loose,
'ConnectionTreeActionsTest', // user
$('div'), // container
@@ -805,11 +777,12 @@ suite('SQL Connection Tree Action tests', () => {
[], // renderers
{}, // data source
{}, // options
testInstantiationService.object,
mockContextKeyService, // IContextKeyService
testListService, // IListService,
new MockContextKeyService(), // IContextKeyService
new TestListService(), // IListService,
undefined, // IThemeService,
testConfigurationService); // IConfigurationService,
new TestConfigurationService(), // IConfigurationService,
undefined, // IKeybindingService,
new TestAccessibilityService()); // IAccessibilityService
tree.callBase = true;
tree.setup(x => x.updateChildren(TypeMoq.It.isAny())).returns(() => Promise.resolve());
@@ -829,7 +802,6 @@ suite('SQL Connection Tree Action tests', () => {
objectExplorerService.verify(x => x.refreshTreeNode(TypeMoq.It.isAny(), TypeMoq.It.isAny()), TypeMoq.Times.exactly(0));
tree.verify(x => x.updateChildren(TypeMoq.It.isAny()), TypeMoq.Times.exactly(0));
tree.verify(x => x.expand(TypeMoq.It.isAny()), TypeMoq.Times.exactly(0));
done();
});
});