Add 80+ additional icons from FontAwesome (#6803)

* Add 80+ additional icons from FontAwesome

* fix: color switch transition, add 6 more icons to fill out grid

* Add strict validation for collection icon

* fix: Avoid import from app in server
This commit is contained in:
Tom Moor
2024-04-13 12:33:07 -06:00
committed by GitHub
parent 689886797c
commit 765ae7b298
18 changed files with 429 additions and 155 deletions

View File

@@ -174,6 +174,7 @@ describe("#collections.move", () => {
token: admin.getJwtToken(),
id: collection.id,
index: "P",
icon: "flame",
},
});
const body = await res.json();
@@ -181,6 +182,20 @@ describe("#collections.move", () => {
expect(body.success).toBe(true);
});
it("should return error when icon is not valid", async () => {
const team = await buildTeam();
const admin = await buildAdmin({ teamId: team.id });
const collection = await buildCollection({ teamId: team.id });
const res = await server.post("/api/collections.move", {
body: {
token: admin.getJwtToken(),
id: collection.id,
icon: "nonsRence",
},
});
expect(res.status).toEqual(400);
});
it("should return error when index is not valid", async () => {
const team = await buildTeam();
const admin = await buildAdmin({ teamId: team.id });