feat(tip): add selectable coffee gift tiers

This commit is contained in:
2026-07-15 17:00:25 +08:00
parent e1a43a641b
commit c277b3e6ca
16 changed files with 480 additions and 98 deletions
@@ -32,28 +32,8 @@ describe("external entry navigation", () => {
expect(resolveExternalEntryTarget({ target: "sidebar" })).toBe(ROUTES.chat);
});
it("routes tip entries to the requested coffee type", () => {
expect(
resolveExternalEntryDestination({
target: "tip",
coffeeType: "medium",
}),
).toBe("/tip?coffee_type=medium");
expect(
resolveExternalEntryDestination({
target: "tip",
coffeeType: "large",
}),
).toBe("/tip?coffee_type=large");
});
it("defaults invalid tip coffee types to small", () => {
expect(
resolveExternalEntryDestination({
target: "tip",
coffeeType: "unknown",
}),
).toBe("/tip?coffee_type=small");
it("routes every tip entry to the tier selection page", () => {
expect(resolveExternalEntryDestination({ target: "tip" })).toBe("/tip");
});
});