mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: Filtering text of NamespaceSelectFilter shouldn't look bold
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
40bca3b14a
commit
72a48417e4
@ -25,6 +25,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves renders 1`] = `
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
All namespaces
|
All namespaces
|
||||||
@ -76,6 +77,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when clicked rend
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
All namespaces
|
All namespaces
|
||||||
@ -737,6 +739,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
Namespace: test-2
|
Namespace: test-2
|
||||||
@ -788,6 +791,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
Namespace: test-2
|
Namespace: test-2
|
||||||
@ -1449,6 +1453,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
Namespace: test-1
|
Namespace: test-1
|
||||||
@ -1500,6 +1505,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
Namespaces: test-1, test-3
|
Namespaces: test-1, test-3
|
||||||
@ -2161,6 +2167,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
All namespaces
|
All namespaces
|
||||||
@ -2822,6 +2829,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
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
|
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[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
Namespaces: test-1, test-10, test-11, test-12, test-13, test-4, test-5, test-6, test-7, test-8, test-9
|
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[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
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
|
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[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
Namespace: test-5
|
Namespace: test-5
|
||||||
@ -4856,6 +4867,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
1*
|
1*
|
||||||
@ -5157,6 +5169,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when clicked when
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
1
|
1
|
||||||
@ -5458,6 +5471,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when menu expand
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
All namespaces
|
All namespaces
|
||||||
@ -6119,6 +6133,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves when menu expand
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
All namespaces
|
All namespaces
|
||||||
@ -6170,6 +6185,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves with thousands of
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
All namespaces
|
All namespaces
|
||||||
@ -6221,6 +6237,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves with thousands of
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
All namespaces
|
All namespaces
|
||||||
@ -6972,6 +6989,7 @@ exports[`<NamespaceSelectFilter /> once the subscribe resolves with thousands of
|
|||||||
class="gradient left"
|
class="gradient left"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
for="namespace-select-filter-filter"
|
for="namespace-select-filter-filter"
|
||||||
>
|
>
|
||||||
All namespaces
|
All namespaces
|
||||||
|
|||||||
@ -39,17 +39,20 @@ const NamespaceSelectFilterMenu = observer(({ id, model }: Dependencies & Namesp
|
|||||||
<div className="non-icon">
|
<div className="non-icon">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id={`${id}-filter`}
|
id={`${id}-input`}
|
||||||
value={model.filterText.get()}
|
value={model.filterText.get()}
|
||||||
onChange={(event) => model.filterText.set(event.target.value)}
|
onChange={(event) => model.filterText.set(event.target.value)}
|
||||||
onClick={model.menu.open}
|
onClick={model.menu.open}
|
||||||
data-testid="namespace-select-filter-input"
|
data-testid="namespace-select-filter-input"
|
||||||
/>
|
/>
|
||||||
<Gradient type="left" />
|
<Gradient type="left" />
|
||||||
<label htmlFor={`${id}-filter`}>
|
<label
|
||||||
|
htmlFor={`${id}-input`}
|
||||||
|
data-testid="namespace-select-filter-label"
|
||||||
|
>
|
||||||
{(
|
{(
|
||||||
model.filterText.get() !== ""
|
model.filterText.get() !== ""
|
||||||
? model.filterText.get()
|
? ""
|
||||||
: (
|
: (
|
||||||
model.menu.hasSelectedAll.get()
|
model.menu.hasSelectedAll.get()
|
||||||
? "All namespaces"
|
? "All namespaces"
|
||||||
|
|||||||
@ -1,9 +1,3 @@
|
|||||||
@include theme-light {
|
|
||||||
.NamespaceSelectFilter {
|
|
||||||
--gradientColor: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.namespace-select-filter {
|
.namespace-select-filter {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@ -351,6 +351,14 @@ describe("<NamespaceSelectFilter />", () => {
|
|||||||
expect(result.baseElement).toMatchSnapshot();
|
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", () => {
|
it("menu is still open", () => {
|
||||||
expect(result.getByTestId("namespace-select-filter-list-container")).toBeInTheDocument();
|
expect(result.getByTestId("namespace-select-filter-list-container")).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user