Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/apps/ui/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ function Header() {
<img src={logoURL} width={"30px"} />
<ClearNotificationsButton />
</Group>
<div
<Group
className={`${classes.searchWrapper} ${isSearchFocused ? classes.searchWrapperExpanded : ""}`}
>
<Search onFocusChange={setIsSearchFocused} />
</div>
</Group>
<Group>
<UserMenu />
</Group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,152 +28,4 @@ describe("getSuggestions", () => {

expect(result).toEqual([])
})

//----------------------------------------------
it("basic tag suggestion 1", () => {
const input = "tag:"
const result = getSuggestions(input)

expect(result).toEqual([
{
type: "operator",
items: ["all:", "any:", "not:"].sort()
},
{
type: "tag",
filter: "",
exclude: []
}
])
})

//----------------------------------------------
it("basic tag suggestion 2 - with two parts and no spaces", () => {
const input = "tag:a"
const result = getSuggestions(input)

expect(result).toEqual([
{
type: "operator",
items: ["all:", "any:"].sort()
},
{
type: "tag",
filter: "a",
exclude: []
}
])
})

//----------------------------------------------
it("basic tag suggestion 3 - with two parts and spaces", () => {
const input = "tag: a"
const result = getSuggestions(input)

expect(result).toEqual([
{
type: "operator",
items: ["all:", "any:"].sort()
},
{
type: "tag",
filter: "a",
exclude: []
}
])
})
//----------------------------------------------
it("basic tag suggestion 4 - with three parts and no spaces", () => {
const input = "tag:any:inv"
const result = getSuggestions(input)

expect(result).toEqual([
{
type: "tag",
filter: "inv",
exclude: []
}
])
})
//----------------------------------------------
it("Category suggestion 1 - cat: - just filter name", () => {
const input = "cat:"
const result = getSuggestions(input)

expect(result).toEqual([
{
type: "operator",
items: ["any:", "not:"].sort()
},
{
type: "category",
filter: "",
exclude: []
}
])
})

//----------------------------------------------
it("Category suggestion 2 - cat:values - no spaces between filter name and values", () => {
const input = "cat:a"
const result = getSuggestions(input)

expect(result).toEqual([
{
type: "operator",
items: ["any:"].sort()
},
{
type: "category",
filter: "a",
exclude: []
}
])
})

//----------------------------------------------
it("Category suggestion 3 - cat: values - with saces between filter name and values", () => {
const input = "cat: a"
const result = getSuggestions(input)

expect(result).toEqual([
{
type: "operator",
items: ["any:"].sort()
},
{
type: "category",
filter: "a",
exclude: []
}
])
})

//----------------------------------------------
it("Category suggestion 4 - cat:operator:values", () => {
const input = "cat:any:letter"
const result = getSuggestions(input)

expect(result).toEqual([
{
type: "category",
filter: "letter",
exclude: []
}
])
})

//----------------------------------------------
it("Custom field basic - cf:", () => {
const input = "cf:"
const result = getSuggestions(input)

expect(result).toEqual([
{
type: "customField",
filter: "",
exclude: []
}
])
})
})

This file was deleted.

Loading