diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 40998c7d7..d9f89b4b6 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -233,6 +233,32 @@ def test_off_peak_underfloor_asserts_a_dual_meter(main_heating_value: str) -> No assert simulation.heating.meter_type == "Dual" +@pytest.mark.parametrize( + "main_heating_value", + [ + "Electric underfloor, in concrete slab (off-peak)", + "Electric underfloor, integrated storage and direct-acting", + "Electric underfloor, in screed above insulation", + ], +) +def test_electric_underfloor_overlays_the_underfloor_category( + main_heating_value: str, +) -> None: + # A system-replacing override must stamp the underfloor heating category + # (SAP Table 4a Category 8). Leaving it unset lets the replaced system's + # category survive onto the effective cert — property 711795's community + # heating (category 6) survived an underfloor override, so the heating + # generator read the dwelling as a heat network and offered no heating + # upgrade at all, and the baseline mis-rated 51 vs 67 (ADR-0050). + # Act + simulation = main_heating_overlay_for(main_heating_value, 0) + + # Assert — SAP Table 4a Category 8 (Electric underfloor heating). + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.main_heating_category == 8 + + def test_screed_underfloor_defers_the_meter_to_the_cert() -> None: # "In screed above insulation (standard or off peak)" is tariff-ambiguous (81% # of the corpus lodge off-peak), so the archetype cannot know the meter — it