Add optional battery metadata fields
New nullable columns on Battery: size, chemistry, capacity_mah, tested_capacity_mah, tested_date, charge_cycles, purchase_date. Battery detail page shows all populated fields and a full edit form with select dropdowns for size and chemistry (with Other fallback). Capacity health % shown in green/orange/red when both nominal and tested capacity are set. Dashboard gains a Size column.
This commit is contained in:
@@ -90,7 +90,7 @@ def test_battery_detail_not_found(client):
|
||||
# ------------------------------------------------------------------ #
|
||||
|
||||
def test_edit_notes(seeded_client):
|
||||
seeded_client.post("/battery/1/edit-notes", data={"notes": "test note here"})
|
||||
seeded_client.post("/battery/1/edit-details", data={"notes": "test note here"})
|
||||
resp = seeded_client.get("/battery/1")
|
||||
assert b"test note here" in resp.data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user