fixed dashboard cards, add fuse js, fix load times, fix csp in scripts, fix remote desktop not working first try.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { afterAll, describe, expect, test } from "bun:test";
|
||||
import { deleteClientRow, listClients, setClientBookmark, upsertClientRow } from "./db";
|
||||
import { deleteClientRow, listClients, setClientBookmark, setClientTag, upsertClientRow } from "./db";
|
||||
|
||||
const createdClientIds: string[] = [];
|
||||
|
||||
@@ -110,4 +110,33 @@ describe("client list ordering", () => {
|
||||
cleanupCreatedClients();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
test("search tolerates typos across client metadata", () => {
|
||||
try {
|
||||
const prefix = `fuse-${Date.now().toString(36)}`;
|
||||
const id = `${prefix}-finance-terminal`;
|
||||
|
||||
createTempClient(id, {
|
||||
online: true,
|
||||
lastSeen: Date.now(),
|
||||
host: "finance-terminal",
|
||||
});
|
||||
setClientTag(id, "Payroll Workstation", "Quarterly reporting machine");
|
||||
|
||||
const result = listClients({
|
||||
page: 1,
|
||||
pageSize: 12,
|
||||
search: "payrol workstaton",
|
||||
sort: "last_seen_desc",
|
||||
statusFilter: "all",
|
||||
osFilter: "all",
|
||||
countryFilter: "all",
|
||||
enrollmentFilter: "all",
|
||||
});
|
||||
|
||||
expect(result.items.some((item) => item.id === id)).toBe(true);
|
||||
} finally {
|
||||
cleanupCreatedClients();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user