From 05c93f42443e0166a1580cbffd72e79d451bd23d Mon Sep 17 00:00:00 2001 From: Chris Berry <73450+anotherchrisberry@users.noreply.github.com> Date: Wed, 22 Jan 2020 09:25:54 -0800 Subject: [PATCH] fix(core/kubernetes): clean up console noise in tests (#7794) --- .../modules/core/src/plugins/plugin.registry.spec.ts | 1 + .../core/src/presentation/forms/inputs/JsonEditor.tsx | 9 ++++++++- .../src/v2/manifest/editor/json/JsonEditor.tsx | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/scripts/modules/core/src/plugins/plugin.registry.spec.ts b/app/scripts/modules/core/src/plugins/plugin.registry.spec.ts index b0c64eac5d7..f2a4efb26b7 100644 --- a/app/scripts/modules/core/src/plugins/plugin.registry.spec.ts +++ b/app/scripts/modules/core/src/plugins/plugin.registry.spec.ts @@ -58,6 +58,7 @@ describe('PluginRegistry', () => { it('should return a rejected promise if a loaded module doesnt contain an export named plugin', async () => { loadModuleFromUrlSpy.and.callFake(fakePromise({})); + spyOn(console, 'error').and.stub(); const plugin1 = { name: 'foo', version: '1.0.0' }; pluginRegistry.register(plugin1); diff --git a/app/scripts/modules/core/src/presentation/forms/inputs/JsonEditor.tsx b/app/scripts/modules/core/src/presentation/forms/inputs/JsonEditor.tsx index cea37fc22a6..b598fb815c4 100644 --- a/app/scripts/modules/core/src/presentation/forms/inputs/JsonEditor.tsx +++ b/app/scripts/modules/core/src/presentation/forms/inputs/JsonEditor.tsx @@ -51,6 +51,13 @@ export class JsonEditor extends React.Component { } public render() { - return ; + return ( + + ); } } diff --git a/app/scripts/modules/kubernetes/src/v2/manifest/editor/json/JsonEditor.tsx b/app/scripts/modules/kubernetes/src/v2/manifest/editor/json/JsonEditor.tsx index b8267f5fa1d..4253ee42dca 100644 --- a/app/scripts/modules/kubernetes/src/v2/manifest/editor/json/JsonEditor.tsx +++ b/app/scripts/modules/kubernetes/src/v2/manifest/editor/json/JsonEditor.tsx @@ -49,6 +49,7 @@ export class JsonEditor extends React.Component { showLineNumbers: false, showFoldWidgets: false, }} + editorProps={{ $blockScrolling: Infinity }} className="ace-editor" /> );