Add Hario Switch to the brewer picker (immersion)
Test and deploy / test-and-deploy (push) Successful in 53s
Test and deploy / test-and-deploy (push) Successful in 53s
Also test that every brew method ships a silhouette so the picker can never render an empty tile. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5
parent
38c7d01e03
commit
16d5af83f7
@@ -15,6 +15,7 @@ export const BREW_METHODS = [
|
||||
{ key: "aeropress", name: "AeroPress", category: "immersion" },
|
||||
{ key: "clever", name: "Clever dripper", category: "immersion" },
|
||||
{ key: "siphon", name: "Siphon", category: "immersion" },
|
||||
{ key: "hario-switch", name: "Hario Switch", category: "immersion" },
|
||||
{ key: "cold-brew", name: "Cold brew", category: "immersion" },
|
||||
{ key: "cupping", name: "Cupping bowl", category: "immersion" },
|
||||
{ key: "v60", name: "V60", category: "percolation" },
|
||||
@@ -60,6 +61,13 @@ export const BREW_SILHOUETTES = {
|
||||
"M28 48h8v6h-8z", // stand stem
|
||||
"M20 54h24v4H20z", // stand base
|
||||
],
|
||||
"hario-switch": [
|
||||
"M12 6h40L34 28h-4z", // V60-style cone
|
||||
"M24 28h16v14H24z", // glass base holding the immersion
|
||||
"M40 32h10v6H40z", // side switch lever
|
||||
"M18 42h28v6H18z", // base ring
|
||||
"M22 56h20v4H22z", // foot
|
||||
],
|
||||
"cold-brew": [
|
||||
"M26 4h12v6H26z", // cap
|
||||
"M24 10h16l4 10v34a4 4 0 0 1-4 4H24a4 4 0 0 1-4-4V20z", // bottle
|
||||
|
||||
@@ -102,6 +102,17 @@ test("brews: validation, update, filter by bean, method taxonomy", async () => {
|
||||
assert.equal(methods.status, 200);
|
||||
assert.equal(methods.body.categories.length, 3);
|
||||
assert.equal(methods.body.methods.some((m) => m.key === "moka"), true);
|
||||
const harioSwitch = methods.body.methods.find((m) => m.key === "hario-switch");
|
||||
assert.equal(harioSwitch?.category, "immersion");
|
||||
|
||||
// Every method must have a silhouette so the picker never renders an empty tile
|
||||
const { BREW_METHODS, BREW_SILHOUETTES } = await import("../shared/brew-data.js");
|
||||
for (const method of BREW_METHODS)
|
||||
assert.equal(
|
||||
BREW_SILHOUETTES[method.key]?.length > 0,
|
||||
true,
|
||||
`missing silhouette for ${method.key}`,
|
||||
);
|
||||
|
||||
// Unknown method rejected
|
||||
assert.equal(
|
||||
|
||||
Reference in New Issue
Block a user