Эх сурвалжийг харах

HUE-9090 [frontend] Add additional ko binding tests

Johan Ahlen 6 жил өмнө
parent
commit
2555476188
40 өөрчлөгдсөн 320 нэмэгдсэн , 43 устгасан
  1. 17 6
      desktop/core/src/desktop/js/jest/koTestUtils.js
  2. 3 0
      desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.templateContextMenu.test.js.snap
  3. 3 0
      desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.templatePopover.test.js.snap
  4. 3 0
      desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.toggleOverflow.test.js.snap
  5. 3 0
      desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.toogle.test.js.snap
  6. 3 0
      desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.tooltip.test.js.snap
  7. 3 0
      desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.truncatedText.test.js.snap
  8. 3 0
      desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.verticalSlide.test.js.snap
  9. 3 0
      desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.visibleOnHover.test.js.snap
  10. 33 0
      desktop/core/src/desktop/js/ko/bindings/ko.templateContextMenu.test.js
  11. 36 0
      desktop/core/src/desktop/js/ko/bindings/ko.templatePopover.test.js
  12. 32 0
      desktop/core/src/desktop/js/ko/bindings/ko.textSqueezer.test.js
  13. 38 0
      desktop/core/src/desktop/js/ko/bindings/ko.toggleOverflow.test.js
  14. 9 0
      desktop/core/src/desktop/js/ko/bindings/ko.toogle.test.js
  15. 31 0
      desktop/core/src/desktop/js/ko/bindings/ko.tooltip.test.js
  16. 33 0
      desktop/core/src/desktop/js/ko/bindings/ko.truncatedText.test.js
  17. 14 10
      desktop/core/src/desktop/js/ko/bindings/ko.verticalSlide.test.js
  18. 32 0
      desktop/core/src/desktop/js/ko/bindings/ko.visibleOnHover.test.js
  19. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.catalogEntriesList.test.js.snap
  20. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.contextSelector.test.js.snap
  21. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.dropDown.test.js.snap
  22. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.executionAnalysis.test.js.snap
  23. 2 2
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.favoriteApp.test.js.snap
  24. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.fieldSamples.test.js.snap
  25. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.globalSearch.test.js.snap
  26. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.historyPanel.test.js.snap
  27. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.inlineAutocomplete.test.js.snap
  28. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.jobBrowserLinks.test.js.snap
  29. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.multiClusterSidebar.test.js.snap
  30. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.navProperties.test.js.snap
  31. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.navTags.test.js.snap
  32. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.performanceGraph.test.js.snap
  33. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.pollingCatalogEntriesList.test.js.snap
  34. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.sentryPrivileges.test.js.snap
  35. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.sessionPanel.test.js.snap
  36. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.sidebar.test.js.snap
  37. 1 1
      desktop/core/src/desktop/js/ko/components/__snapshots__/ko.sqlColumnsTable.test.js.snap
  38. 1 5
      desktop/core/src/desktop/js/ko/components/ko.pollingCatalogEntriesList.js
  39. 0 1
      desktop/core/src/desktop/js/ko/components/ko.sessionAuthModal.test.js
  40. 0 1
      desktop/core/src/desktop/js/ko/ko.all.js

+ 17 - 6
desktop/core/src/desktop/js/jest/koTestUtils.js

@@ -46,7 +46,7 @@ export const koSetup = () => {
         const element = window.document.createElement('div');
         element.setAttribute(
           'data-bind',
-          `descendantsComplete: $data.descendantsComplete.bind($data), component: { name: "${name}", params: $data.params }`
+          `descendantsComplete: descendantsComplete, component: { name: "${name}", params: params }`
         );
         wrapper.appendChild(element);
 
@@ -80,11 +80,22 @@ export const koSetup = () => {
 
     renderKo: async (html, viewModel) =>
       new Promise(resolve => {
-        wrapper.innerHTML = html;
-        ko.applyBindings(viewModel, wrapper);
-        window.setTimeout(() => {
-          resolve(wrapper);
-        }, 0);
+        const setupContainer = window.document.createElement('div');
+        setupContainer.setAttribute(
+          'data-bind',
+          '{ descendantsComplete: descendantsComplete, with: model }'
+        );
+
+        const container = window.document.createElement('div');
+        container.innerHTML = html;
+        setupContainer.appendChild(container);
+
+        const data = {
+          model: viewModel,
+          descendantsComplete: () => resolve(container)
+        };
+
+        ko.applyBindings(data, setupContainer);
       }),
 
     waitForKoUpdate: async () => {

+ 3 - 0
desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.templateContextMenu.test.js.snap

@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ko.templateContextMenu.js should render binding 1`] = `"<div data-bind=\\"templateContextMenu: { }\\"></div>"`;

+ 3 - 0
desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.templatePopover.test.js.snap

@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ko.templatePopover.js should render binding 1`] = `"<div id=\\"popoverTest\\" data-bind=\\"templatePopover: { trigger: 'click' }\\"></div>"`;

+ 3 - 0
desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.toggleOverflow.test.js.snap

@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ko.toggleOverflow.js should render binding 1`] = `"<div data-bind=\\"toggleOverflow\\"><div class=\\"toggle-overflow\\">Some text</div><div class=\\"toggle-overflow-toggle\\"><i class=\\"fa fa-caret-down muted\\"></i></div></div>"`;

+ 3 - 0
desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.toogle.test.js.snap

@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ko.toggle.js should render binding 1`] = `"<div class=\\"toggle-test\\" data-bind=\\"toggle: testObservable\\"></div>"`;

+ 3 - 0
desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.tooltip.test.js.snap

@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ko.tooltip.js should render binding 1`] = `"<div data-bind=\\"tooltip\\" data-original-title=\\"some title\\"></div>"`;

+ 3 - 0
desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.truncatedText.test.js.snap

@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ko.truncatedText.js should render binding 1`] = `"<div data-bind=\\"truncatedText: text\\">More than 20 charact...</div>"`;

+ 3 - 0
desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.verticalSlide.test.js.snap

@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ko.verticalSlide.js should render binding 1`] = `"<div data-bind=\\"verticalSlide: slide\\" style=\\"display: none;\\"></div>"`;

+ 3 - 0
desktop/core/src/desktop/js/ko/bindings/__snapshots__/ko.visibleOnHover.test.js.snap

@@ -0,0 +1,3 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ko.visibleOnHover.js should render binding 1`] = `"<div id=\\"foo\\" data-bind=\\"visibleOnHover: { selector: '#foo' }\\"></div>"`;

+ 33 - 0
desktop/core/src/desktop/js/ko/bindings/ko.templateContextMenu.test.js

@@ -0,0 +1,33 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import 'ext/bootstrap.2.3.2.min';
+
+import { koSetup } from 'jest/koTestUtils';
+
+import './ko.templateContextMenu';
+
+describe('ko.templateContextMenu.js', () => {
+  const setup = koSetup();
+
+  jest.useFakeTimers();
+
+  it('should render binding', async () => {
+    const wrapper = await setup.renderKo(`<div data-bind="templateContextMenu: { }"></div>`, {});
+
+    expect(wrapper.innerHTML).toMatchSnapshot();
+  });
+});

+ 36 - 0
desktop/core/src/desktop/js/ko/bindings/ko.templatePopover.test.js

@@ -0,0 +1,36 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import 'ext/bootstrap.2.3.2.min';
+
+import { koSetup } from 'jest/koTestUtils';
+
+import './ko.templatePopover';
+
+describe('ko.templatePopover.js', () => {
+  const setup = koSetup();
+
+  jest.useFakeTimers();
+
+  it('should render binding', async () => {
+    const wrapper = await setup.renderKo(
+      `<div id="popoverTest" data-bind="templatePopover: { trigger: 'click' }"></div>`,
+      {}
+    );
+
+    expect(wrapper.innerHTML).toMatchSnapshot();
+  });
+});

+ 32 - 0
desktop/core/src/desktop/js/ko/bindings/ko.textSqueezer.test.js

@@ -0,0 +1,32 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import { koSetup } from 'jest/koTestUtils';
+
+import './ko.textSqueezer';
+
+describe('ko.textSqueezer.js', () => {
+  const setup = koSetup();
+
+  jest.useFakeTimers();
+
+  // TODO: Move jquery.textsqueezer into webpack
+  xit('should render binding', async () => {
+    const wrapper = await setup.renderKo(`<div data-bind="textSqueezer">Some text</div>`, {});
+
+    expect(wrapper.innerHTML).toMatchSnapshot();
+  });
+});

+ 38 - 0
desktop/core/src/desktop/js/ko/bindings/ko.toggleOverflow.test.js

@@ -0,0 +1,38 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import 'ext/bootstrap.2.3.2.min';
+
+import { koSetup } from 'jest/koTestUtils';
+
+import './ko.toggleOverflow';
+import hueUtils from 'utils/hueUtils';
+
+describe('ko.toggleOverflow.js', () => {
+  const setup = koSetup();
+
+  jest.useFakeTimers();
+
+  it('should render binding', async () => {
+    jest.spyOn(hueUtils, 'isOverflowing').mockImplementation(() => true);
+
+    const wrapper = await setup.renderKo(`<div data-bind="toggleOverflow">Some text</div>`, {});
+
+    jest.runOnlyPendingTimers();
+
+    expect(wrapper.innerHTML).toMatchSnapshot();
+  });
+});

+ 9 - 0
desktop/core/src/desktop/js/ko/bindings/ko.toogle.test.js

@@ -21,6 +21,15 @@ import './ko.toggle';
 describe('ko.toggle.js', () => {
   const setup = koSetup();
 
+  it('should render binding', async () => {
+    const wrapper = await setup.renderKo(
+      '<div class="toggle-test" data-bind="toggle: testObservable"></div>',
+      { testObservable: ko.observable(false) }
+    );
+
+    expect(wrapper.innerHTML).toMatchSnapshot();
+  });
+
   it('should toggle observable', async () => {
     const viewModel = { testObservable: ko.observable(false) };
     const wrapper = await setup.renderKo(

+ 31 - 0
desktop/core/src/desktop/js/ko/bindings/ko.tooltip.test.js

@@ -0,0 +1,31 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import 'ext/bootstrap.2.3.2.min';
+
+import { koSetup } from 'jest/koTestUtils';
+
+import './ko.tooltip';
+
+describe('ko.tooltip.js', () => {
+  const setup = koSetup();
+
+  it('should render binding', async () => {
+    const wrapper = await setup.renderKo(`<div title="some title" data-bind="tooltip"></div>`, {});
+
+    expect(wrapper.innerHTML).toMatchSnapshot();
+  });
+});

+ 33 - 0
desktop/core/src/desktop/js/ko/bindings/ko.truncatedText.test.js

@@ -0,0 +1,33 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import ko from 'knockout';
+
+import { koSetup } from 'jest/koTestUtils';
+
+import './ko.truncatedText';
+
+describe('ko.truncatedText.js', () => {
+  const setup = koSetup();
+
+  it('should render binding', async () => {
+    const wrapper = await setup.renderKo(`<div data-bind="truncatedText: text"></div>`, {
+      text: ko.observable('More than 20 characters')
+    });
+
+    expect(wrapper.innerHTML).toMatchSnapshot();
+  });
+});

+ 14 - 10
desktop/core/src/desktop/js/ko/bindings/ko.timepicker.js → desktop/core/src/desktop/js/ko/bindings/ko.verticalSlide.test.js

@@ -14,16 +14,20 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import $ from 'jquery';
 import ko from 'knockout';
 
-ko.bindingHandlers.timepicker = {
-  init: function(element) {
-    $(element).timepicker({
-      minuteStep: 1,
-      showSeconds: false,
-      showMeridian: false,
-      defaultTime: false
+import { koSetup } from 'jest/koTestUtils';
+
+import './ko.verticalSlide';
+
+describe('ko.verticalSlide.js', () => {
+  const setup = koSetup();
+
+  it('should render binding', async () => {
+    const wrapper = await setup.renderKo(`<div data-bind="verticalSlide: slide"></div>`, {
+      slide: ko.observable(false)
     });
-  }
-};
+
+    expect(wrapper.innerHTML).toMatchSnapshot();
+  });
+});

+ 32 - 0
desktop/core/src/desktop/js/ko/bindings/ko.visibleOnHover.test.js

@@ -0,0 +1,32 @@
+// Licensed to Cloudera, Inc. under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  Cloudera, Inc. licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import { koSetup } from 'jest/koTestUtils';
+
+import './ko.visibleOnHover';
+
+describe('ko.visibleOnHover.js', () => {
+  const setup = koSetup();
+
+  it('should render binding', async () => {
+    const wrapper = await setup.renderKo(
+      `<div id="foo" data-bind="visibleOnHover: { selector: '#foo' }"></div>`,
+      {}
+    );
+
+    expect(wrapper.innerHTML).toMatchSnapshot();
+  });
+});

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.catalogEntriesList.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.catalogEntriesList.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;catalog-entries-list&quot;, params: $data.params }\\"><script type=\\"text/html\\" id=\\"entries-table-td-description\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;catalog-entries-list&quot;, params: params }\\"><script type=\\"text/html\\" id=\\"entries-table-td-description\\">
     <td data-bind=\\"attr: { 'title': comment }\\">
     <!-- ko if: $parent.editableDescriptions && !window.HAS_READ_ONLY_CATALOG -->
       <div class=\\"hue-catalog-entries-table-desc\\" data-bind=\\"visibleOnHover: { selector: '.editable-inline-action' }\\">

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.contextSelector.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.contextSelector.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-context-selector&quot;, params: $data.params }\\"><i class=\\"fa fa-spinner fa-spin muted\\"></i><div class=\\"inline-block\\" style=\\"\\" data-bind=\\"visible: !loadingContext()\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-context-selector&quot;, params: params }\\"><i class=\\"fa fa-spinner fa-spin muted\\"></i><div class=\\"inline-block\\" style=\\"\\" data-bind=\\"visible: !loadingContext()\\">
     <!-- ko if: window.HAS_MULTI_CLUSTER --><!-- /ko -->
 
     <!-- ko if: availableDatabases().length > 0 && !hideDatabases--><!-- /ko -->

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.dropDown.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.dropDown.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-drop-down&quot;, params: $data.params }\\"><a class=\\"inactive-action hue-drop-down-active\\" href=\\"javascript:void(0)\\" data-bind=\\"toggle: dropDownVisible, css: { 'blue': dropDownVisible }\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-drop-down&quot;, params: params }\\"><a class=\\"inactive-action hue-drop-down-active\\" href=\\"javascript:void(0)\\" data-bind=\\"toggle: dropDownVisible, css: { 'blue': dropDownVisible }\\">
     <!-- ko if: icon --><!-- /ko -->
     <!-- ko if: !noLabel && value --><!-- /ko -->
     <i class=\\"fa fa-caret-down\\"></i>

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.executionAnalysis.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.executionAnalysis.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-execution-analysis&quot;, params: $data.params }\\"><div class=\\"hue-execution-analysis\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-execution-analysis&quot;, params: params }\\"><div class=\\"hue-execution-analysis\\">
     <!-- ko hueSpinner: { spin: loading, inline: true } --><!-- /ko -->
     <!-- ko ifnot: loading -->
       <!-- ko if: analysisPossible() && !analysis() -->

+ 2 - 2
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.favoriteApp.test.js.snap

@@ -1,13 +1,13 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.favoriteApp.js should render favorite 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-favorite-app&quot;, params: $data.params }\\"><div class=\\"inline pointer favorite-app\\" data-bind=\\"click: setAsFavoriteApp.bind($data), tooltip: { placement: 'bottom', title: isFavorite() ? 'Unset from default application' : 'Set as default application' }\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-favorite-app&quot;, params: params }\\"><div class=\\"inline pointer favorite-app\\" data-bind=\\"click: setAsFavoriteApp.bind($data), tooltip: { placement: 'bottom', title: isFavorite() ? 'Unset from default application' : 'Set as default application' }\\">
     <i class=\\"fa inactive-action fa-star\\" data-bind=\\"css: { 'fa-star-o': !isFavorite(), 'fa-star': isFavorite }\\"></i>
   </div></div>"
 `;
 
 exports[`ko.favoriteApp.js should render non-favorite 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-favorite-app&quot;, params: $data.params }\\"><div class=\\"inline pointer favorite-app\\" data-bind=\\"click: setAsFavoriteApp.bind($data), tooltip: { placement: 'bottom', title: isFavorite() ? 'Unset from default application' : 'Set as default application' }\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-favorite-app&quot;, params: params }\\"><div class=\\"inline pointer favorite-app\\" data-bind=\\"click: setAsFavoriteApp.bind($data), tooltip: { placement: 'bottom', title: isFavorite() ? 'Unset from default application' : 'Set as default application' }\\">
     <i class=\\"fa inactive-action fa-star-o\\" data-bind=\\"css: { 'fa-star-o': !isFavorite(), 'fa-star': isFavorite }\\"></i>
   </div></div>"
 `;

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.fieldSamples.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.fieldSamples.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;field-samples&quot;, params: $data.params }\\"><div class=\\"context-popover-inline-autocomplete\\" style=\\"display: flex\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;field-samples&quot;, params: params }\\"><div class=\\"context-popover-inline-autocomplete\\" style=\\"display: flex\\">
     <div class=\\"context-popover-sample-filter\\">
       <!-- ko component: {
         name: 'inline-autocomplete',

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.globalSearch.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.globalSearch.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-global-search&quot;, params: $data.params }\\"><script type=\\"text/html\\" id=\\"top-search-autocomp-item\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-global-search&quot;, params: params }\\"><script type=\\"text/html\\" id=\\"top-search-autocomp-item\\">
     <a href=\\"javascript:void(0);\\">
       <div>
         <div><i class=\\"fa fa-fw\\" data-bind=\\"css: icon\\"></i></div>

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.historyPanel.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.historyPanel.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-history-panel&quot;, params: $data.params }\\"><button class=\\"btn btn-flat pull-right btn-toggle-jobs-panel\\" title=\\"Task History\\" data-bind=\\"click: toggleVisibility\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-history-panel&quot;, params: params }\\"><button class=\\"btn btn-flat pull-right btn-toggle-jobs-panel\\" title=\\"Task History\\" data-bind=\\"click: toggleVisibility\\">
     <i class=\\"fa fa-history\\"></i>
     <div class=\\"jobs-badge\\" data-bind=\\"text: historyRunningJobs().length, visible: historyRunningJobs().length > 0\\" style=\\"display: none;\\">0</div>
   </button><div class=\\"jobs-panel history-panel\\" data-bind=\\"visible: historyPanelVisible, style: { 'top' : top, 'left': left }\\" style=\\"display: none;\\">

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.inlineAutocomplete.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.inlineAutocomplete.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;inline-autocomplete&quot;, params: $data.params }\\"><div class=\\"inline-autocomp-container\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;inline-autocomplete&quot;, params: params }\\"><div class=\\"inline-autocomp-container\\">
     <div>
       <!-- ko if: showMagnify --><!-- /ko-->
       <form autocomplete=\\"off\\">

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.jobBrowserLinks.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.jobBrowserLinks.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-job-browser-links&quot;, params: $data.params }\\"><div class=\\"btn-group pull-right\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-job-browser-links&quot;, params: params }\\"><div class=\\"btn-group pull-right\\">
     <!-- ko if: window.IS_K8S_ONLY --><!-- /ko -->
     <!-- ko if: window.HAS_JOB_BROWSER --><!-- /ko -->
   </div></div>"

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.multiClusterSidebar.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.multiClusterSidebar.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-multi-cluster-sidebar&quot;, params: $data.params }\\"><div class=\\"sidebar-content\\" data-bind=\\"foreach: categories\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-multi-cluster-sidebar&quot;, params: params }\\"><div class=\\"sidebar-content\\" data-bind=\\"foreach: categories\\">
     <!-- ko if: typeof label !== 'undefined' --><!-- /ko -->
     <!-- ko foreach: items -->
     <!-- ko if: typeof items == 'undefined' -->

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.navProperties.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.navProperties.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;nav-properties&quot;, params: $data.params }\\"><script type=\\"text/html\\" id=\\"nav-property-edit-popover-content\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;nav-properties&quot;, params: params }\\"><script type=\\"text/html\\" id=\\"nav-property-edit-popover-content\\">
     <div class=\\"hue-nav-property-edit-content\\">
       <a href=\\"javascript: void(0);\\" class=\\"close-popover\\"><i class=\\"fa fa-times\\"></i></a>
       <div class=\\"control-group\\" data-bind=\\"css: { 'error': keyInvalid }\\">

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.navTags.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.navTags.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;nav-tags&quot;, params: $data.params }\\"><div style=\\"width: 100%; height: 20px; left: 6px; position: relative;\\" data-bind=\\"hueSpinner: { spin: loading }\\"></div><div class=\\"hue-tags read-only-tags\\" style=\\"width: 100%\\" data-bind=\\"ifnot: loading, css: { 'read-only-tags': readOnly }\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;nav-tags&quot;, params: params }\\"><div style=\\"width: 100%; height: 20px; left: 6px; position: relative;\\" data-bind=\\"hueSpinner: { spin: loading }\\"></div><div class=\\"hue-tags read-only-tags\\" style=\\"width: 100%\\" data-bind=\\"ifnot: loading, css: { 'read-only-tags': readOnly }\\">
    <textarea style=\\"width: 100%; display: none;\\" data-bind=\\"tagEditor: {
       emptyPlaceholder: 'Add tags...',
       readOnly: readOnly,

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.performanceGraph.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.performanceGraph.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;performance-graph&quot;, params: $data.params }\\"><script type=\\"text/html\\" id=\\"performance-graph-d3-template\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;performance-graph&quot;, params: params }\\"><script type=\\"text/html\\" id=\\"performance-graph-d3-template\\">
   <div style=\\"position:relative;\\"
       data-bind=\\"attr: { 'id': id }, style: { height: graphHeight + 'px', width: graphWidth + 'px' }\\"></div>
 </script><div style=\\"position: relative\\" data-bind=\\"template: { afterRender: componentRendered }\\">

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.pollingCatalogEntriesList.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.pollingCatalogEntriesList.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;polling-catalog-entries-list&quot;, params: $data.params }\\"><div>
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;polling-catalog-entries-list&quot;, params: params }\\"><div>
     <!-- ko hueSpinner: { spin: !catalogEntryExists(), inline: true } --><!-- /ko -->
     <!-- ko if: catalogEntryExists --><!-- /ko -->
   </div></div>"

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.sentryPrivileges.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.sentryPrivileges.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-sentry-privileges&quot;, params: $data.params }\\"><script type=\\"text/html\\" id=\\"sentry-privileges-component-role\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-sentry-privileges&quot;, params: params }\\"><script type=\\"text/html\\" id=\\"sentry-privileges-component-role\\">
     <div class=\\"acl-block-title\\">
       <i class=\\"fa fa-cube muted\\"></i> <a class=\\"pointer\\" data-bind=\\"click: function(){  $parents[0].showRole($data); }\\"><span data-bind=\\"text: name\\"></span></a>
     </div>

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.sessionPanel.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.sessionPanel.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;session-panel&quot;, params: $data.params }\\"><div class=\\"session-panel\\" data-test=\\"session-panel\\" data-bind=\\"slideVisible: visible\\" style=\\"display: none;\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;session-panel&quot;, params: params }\\"><div class=\\"session-panel\\" data-test=\\"session-panel\\" data-bind=\\"slideVisible: visible\\" style=\\"display: none;\\">
   <div class=\\"margin-top-10 padding-left-10 padding-right-10\\">
     <h4 class=\\"margin-bottom-10\\"><i class=\\"fa fa-cogs\\"></i> Sessions</h4>
     <div class=\\"session-panel-content\\">

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.sidebar.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.sidebar.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;hue-sidebar&quot;, params: $data.params }\\" class=\\"collapsed\\"><script type=\\"text/html\\" id=\\"sidebar-inner-item\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;hue-sidebar&quot;, params: params }\\" class=\\"collapsed\\"><script type=\\"text/html\\" id=\\"sidebar-inner-item\\">
     <!-- ko if: iconHtml -->
     <div class=\\"icon\\" data-bind=\\"html: iconHtml\\"></div><span data-bind=\\"text: displayName\\"></span>
     <!-- /ko -->

+ 1 - 1
desktop/core/src/desktop/js/ko/components/__snapshots__/ko.sqlColumnsTable.test.js.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`ko.sqlColumnsTable.js should render component 1`] = `
-"<div data-bind=\\"descendantsComplete: $data.descendantsComplete.bind($data), component: { name: &quot;sql-columns-table&quot;, params: $data.params }\\"><div class=\\"context-popover-flex\\">
+"<div data-bind=\\"descendantsComplete: descendantsComplete, component: { name: &quot;sql-columns-table&quot;, params: params }\\"><div class=\\"context-popover-flex\\">
       <div class=\\"context-popover-flex-header\\">
         <div class=\\"context-popover-header\\" style=\\"display:inline-block;\\">Columns (<span data-bind=\\"text: filteredColumns().length\\">0</span>)</div>
         <div class=\\"context-popover-inline-autocomplete\\">

+ 1 - 5
desktop/core/src/desktop/js/ko/components/ko.pollingCatalogEntriesList.js

@@ -163,8 +163,4 @@ class PollingCatalogEntriesList {
   }
 }
 
-componentUtils.registerComponent(
-  NAME,
-  PollingCatalogEntriesList,
-  TEMPLATE
-);
+componentUtils.registerComponent(NAME, PollingCatalogEntriesList, TEMPLATE);

+ 0 - 1
desktop/core/src/desktop/js/ko/components/ko.sessionAuthModal.test.js

@@ -14,7 +14,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-import ko from 'knockout';
 import { SHOWN_EVENT, SHOW_EVENT } from './ko.sessionAuthModal';
 import huePubSub from 'utils/huePubSub';
 

+ 0 - 1
desktop/core/src/desktop/js/ko/ko.all.js

@@ -119,7 +119,6 @@ import 'ko/bindings/ko.tagsNotAllowed';
 import 'ko/bindings/ko.templateContextMenu';
 import 'ko/bindings/ko.templatePopover';
 import 'ko/bindings/ko.textSqueezer';
-import 'ko/bindings/ko.timepicker';
 import 'ko/bindings/ko.toggle';
 import 'ko/bindings/ko.toggleOverflow';
 import 'ko/bindings/ko.tooltip';