diff --git a/packages/core/src/renderer/components/namespace-select-filter/__snapshots__/namespace-select-filter.test.tsx.snap b/packages/core/src/renderer/components/namespace-select-filter/__snapshots__/namespace-select-filter.test.tsx.snap index 83f846442e..b4d72bb7eb 100644 --- a/packages/core/src/renderer/components/namespace-select-filter/__snapshots__/namespace-select-filter.test.tsx.snap +++ b/packages/core/src/renderer/components/namespace-select-filter/__snapshots__/namespace-select-filter.test.tsx.snap @@ -25,6 +25,7 @@ exports[` once the subscribe resolves renders 1`] = ` class="gradient left" /> All namespaces @@ -76,6 +77,7 @@ exports[` once the subscribe resolves when clicked rend class="gradient left" /> All namespaces @@ -737,6 +739,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> Namespace: test-2 @@ -788,6 +791,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> Namespace: test-2 @@ -1449,6 +1453,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> Namespace: test-1 @@ -1500,6 +1505,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> Namespaces: test-1, test-3 @@ -2161,6 +2167,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> All namespaces @@ -2822,6 +2829,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> Namespaces: test-1, test-10, test-11, test-12, test-13, test-3, test-4, test-5, test-6, test-7, test-8, test-9 @@ -3483,6 +3491,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> Namespaces: test-1, test-10, test-11, test-12, test-13, test-4, test-5, test-6, test-7, test-8, test-9 @@ -4144,6 +4153,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> Namespaces: test-1, test-10, test-11, test-12, test-13, test-2, test-4, test-5, test-6, test-7, test-8, test-9 @@ -4805,6 +4815,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> Namespace: test-5 @@ -4856,6 +4867,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> 1* @@ -5157,6 +5169,7 @@ exports[` once the subscribe resolves when clicked when class="gradient left" /> 1 @@ -5458,6 +5471,7 @@ exports[` once the subscribe resolves when menu expand class="gradient left" /> All namespaces @@ -6119,6 +6133,7 @@ exports[` once the subscribe resolves when menu expand class="gradient left" /> All namespaces @@ -6170,6 +6185,7 @@ exports[` once the subscribe resolves with thousands of class="gradient left" /> All namespaces @@ -6221,6 +6237,7 @@ exports[` once the subscribe resolves with thousands of class="gradient left" /> All namespaces @@ -6972,6 +6989,7 @@ exports[` once the subscribe resolves with thousands of class="gradient left" /> All namespaces diff --git a/packages/core/src/renderer/components/namespace-select-filter/component.tsx b/packages/core/src/renderer/components/namespace-select-filter/component.tsx index bb1ed22761..2bc1114e12 100644 --- a/packages/core/src/renderer/components/namespace-select-filter/component.tsx +++ b/packages/core/src/renderer/components/namespace-select-filter/component.tsx @@ -39,17 +39,20 @@ const NamespaceSelectFilterMenu = observer(({ id, model }: Dependencies & Namesp model.filterText.set(event.target.value)} onClick={model.menu.open} data-testid="namespace-select-filter-input" /> - + {( model.filterText.get() !== "" - ? model.filterText.get() + ? "" : ( model.menu.hasSelectedAll.get() ? "All namespaces" diff --git a/packages/core/src/renderer/components/namespace-select-filter/namespace-select-filter.scss b/packages/core/src/renderer/components/namespace-select-filter/namespace-select-filter.scss index 2eead588e1..268a3c6981 100644 --- a/packages/core/src/renderer/components/namespace-select-filter/namespace-select-filter.scss +++ b/packages/core/src/renderer/components/namespace-select-filter/namespace-select-filter.scss @@ -1,9 +1,3 @@ -@include theme-light { - .NamespaceSelectFilter { - --gradientColor: white; - } -} - .namespace-select-filter { width: 300px; position: relative; diff --git a/packages/core/src/renderer/components/namespace-select-filter/namespace-select-filter.test.tsx b/packages/core/src/renderer/components/namespace-select-filter/namespace-select-filter.test.tsx index 4eb2ec4b53..9260063cd6 100644 --- a/packages/core/src/renderer/components/namespace-select-filter/namespace-select-filter.test.tsx +++ b/packages/core/src/renderer/components/namespace-select-filter/namespace-select-filter.test.tsx @@ -351,6 +351,14 @@ describe("", () => { expect(result.baseElement).toMatchSnapshot(); }); + it("does show something in the input", () => { + expect(result.getByTestId("namespace-select-filter-input")).toHaveValue("1"); + }); + + it("doesn't show anything in the label", () => { + expect(result.getByTestId("namespace-select-filter-label")).toBeEmptyDOMElement(); + }); + it("menu is still open", () => { expect(result.getByTestId("namespace-select-filter-list-container")).toBeInTheDocument(); });