Skip to content

Commit

Permalink
fix tests take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLeonhardt committed Mar 13, 2024
1 parent 2550380 commit 40edb78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vs/platform/quickinput/test/browser/quickinput.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { unthemedProgressBarOptions } from 'vs/base/browser/ui/progressbar/progr
import { QuickInputController } from 'vs/platform/quickinput/browser/quickInputController';
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils';
import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
import { toDisposable } from 'vs/base/common/lifecycle';
import { mainWindow } from 'vs/base/browser/window';
import { QuickPick } from 'vs/platform/quickinput/browser/quickInput';
import { IQuickPickItem } from 'vs/platform/quickinput/common/quickInput';
Expand All @@ -31,6 +31,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService';
import { NoMatchingKb } from 'vs/platform/keybinding/common/keybindingResolver';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService';

// Sets up an `onShow` listener to allow us to wait until the quick pick is shown (useful when triggering an `accept()` right after launching a quick pick)
// kick this off before you launch the picker and then await the promise returned after you launch the picker.
Expand Down Expand Up @@ -63,7 +64,7 @@ suite('QuickInput', () => { // https://github.com/microsoft/vscode/issues/147543
instantiationService.stub(IConfigurationService, new TestConfigurationService());
instantiationService.stub(IListService, store.add(new ListService()));
instantiationService.stub(ILayoutService, { activeContainer: fixture, onDidLayoutContainer: Event.None } as any);
instantiationService.stub(IContextViewService, { showContextView() { return Disposable.None; } } as any);
instantiationService.stub(IContextViewService, store.add(instantiationService.createInstance(ContextViewService)));
instantiationService.stub(IContextKeyService, store.add(instantiationService.createInstance(ContextKeyService)));
instantiationService.stub(IKeybindingService, {
mightProducePrintableCharacter() { return false; },
Expand Down
3 changes: 3 additions & 0 deletions src/vs/workbench/test/browser/workbenchTestServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ import { IMarkerService } from 'vs/platform/markers/common/markers';
import { IAccessibilitySignalService } from 'vs/platform/accessibilitySignal/browser/accessibilitySignalService';
import { IEditorPaneService } from 'vs/workbench/services/editor/common/editorPaneService';
import { EditorPaneService } from 'vs/workbench/services/editor/browser/editorPaneService';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService';

export function createFileEditorInput(instantiationService: IInstantiationService, resource: URI): FileEditorInput {
return instantiationService.createInstance(FileEditorInput, resource, undefined, undefined, undefined, undefined, undefined, undefined);
Expand Down Expand Up @@ -332,6 +334,7 @@ export function workbenchInstantiationService(
instantiationService.stub(ICodeEditorService, disposables.add(new CodeEditorService(editorService, themeService, configService)));
instantiationService.stub(IPaneCompositePartService, disposables.add(new TestPaneCompositeService()));
instantiationService.stub(IListService, new TestListService());
instantiationService.stub(IContextViewService, instantiationService.createInstance(ContextViewService));
instantiationService.stub(IQuickInputService, disposables.add(new QuickInputService(configService, instantiationService, keybindingService, contextKeyService, themeService, layoutService)));
instantiationService.stub(IWorkspacesService, new TestWorkspacesService());
instantiationService.stub(IWorkspaceTrustManagementService, disposables.add(new TestWorkspaceTrustManagementService()));
Expand Down

0 comments on commit 40edb78

Please sign in to comment.