1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

feat!: adds services and stacks to fuzzy search. Note labels will no longer be searchable due to a bug on sorting. (#2999)

This commit is contained in:
Amir Raminfar
2024-05-30 09:47:20 -07:00
committed by GitHub
parent 4edac1174c
commit 3a30c27c9a
7 changed files with 106 additions and 24 deletions

View File

@@ -33,7 +33,7 @@ function createFuzzySearchModal() {
containers: [
new Container("123", new Date(), "image", "test", "command", "host", {}, "status", "running", []),
new Container("345", new Date(), "image", "foo bar", "command", "host", {}, "status", "running", []),
new Container("567", new Date(), "image", "baz", "command", "host", {}, "status", "exited", []),
new Container("567", new Date(), "image", "baz", "command", "host", {}, "status", "running", []),
],
},
},
@@ -56,7 +56,8 @@ describe("<FuzzySearchModal />", () => {
beforeEach(() => {
vi.mocked(useRouter().push).mockReset();
});
test("shows all", async () => {
test("shows running all", async () => {
const wrapper = createFuzzySearchModal();
expect(wrapper.findAll("li").length).toBe(3);
});