feat(tip): add selectable coffee gift tiers
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user