feat(ui): simplify to 3-button manage layout and remove drawer grouping
Build and Push Fridger Container / Build & Push Fridger Image (push) Successful in 1m36s

This commit is contained in:
2026-10-10 23:44:02 +02:00
parent 865affa202
commit 2f7d2f1f47
5 changed files with 434 additions and 532 deletions
+18
View File
@@ -47,6 +47,24 @@ assert.strictEqual(newItem.name, 'Test Yogurt');
assert.strictEqual(newItem.quantity, 500);
assert.strictEqual(newItem.unit, 'g');
// Test Whole Packets: addPacket & removePacket
console.log('Testing packet addition (+1 whole packet of 500g)...');
const testPack = db.createItem({
name: 'Test Milk Pack',
quantity: 1000,
initial_quantity: 1000,
unit: 'ml'
});
const packAdded = db.addPacket(testPack.id, 1);
assert.strictEqual(packAdded.quantity, 2000, 'Adding 1 packet should add 1000ml');
console.log('Testing packet removal (-1 whole packet)...');
const packRemoved = db.removePacket(testPack.id, 1);
assert.strictEqual(packRemoved.quantity, 1000, 'Removing 1 packet should leave 1000ml');
db.deleteItem(testPack.id);
console.log('✓ Whole packet tests passed!');
// Adjust grams: e.g. consumed 150g -> remaining 350g
console.log('Testing partial consumption (-150g)...');
const adjusted = db.adjustQuantity(newItem.id, { delta: -150 });