Skip to content

Commit

Permalink
EPBR-8402 Add main_heating_controls to domestic digest
Browse files Browse the repository at this point in the history
  • Loading branch information
emollett committed Jan 31, 2025
1 parent ae003d6 commit 706b61c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/presenter/rd_sap/domestic_digest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def to_domestic_digest
improvement
end,
photo_supply: @view_model.respond_to?(:photovoltaic_roof_area_percent) ? @view_model.photovoltaic_roof_area_percent : nil,
main_heating_controls: @view_model.all_main_heating_controls_descriptions
}
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/presenter/sap/domestic_digest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def to_domestic_digest
improvement
end,
photo_supply: @view_model.respond_to?(:photovoltaic_roof_area_percent) ? @view_model.photovoltaic_roof_area_percent : nil,
main_heating_controls: @view_model.all_main_heating_controls_descriptions
}
end
end
Expand Down
3 changes: 2 additions & 1 deletion spec/view_model/rd_sap_wrapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,8 @@
indicative_cost: "1000",
sequence: 3,
typical_saving: "99" }],
photo_supply: "0"
photo_supply: "0",
main_heating_controls: ["Programmer, room thermostat and TRVs", "Time and temperature zone control"]
}
end

Expand Down
21 changes: 16 additions & 5 deletions spec/view_model/sap_wrapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3017,12 +3017,14 @@
typical_saving: "88",
},
],
main_heating_controls: ["Programmer, room thermostat and TRVs"]
},
}

is_18 = {
different_fields: {
main_heating_category: "heat pump with warm air distribution",
main_heating_controls: %w[Thermostat Thermostat]
},
}

Expand Down Expand Up @@ -3471,6 +3473,7 @@
typical_saving: "99",
},
],
main_heating_controls: ["Thermostat"]
},
}

Expand Down Expand Up @@ -3585,7 +3588,8 @@
typical_saving: "99",
},
],
photo_supply: "0"
photo_supply: "0",
main_heating_controls: ["Thermostat"]
},
}

Expand Down Expand Up @@ -3703,6 +3707,7 @@
typical_saving: "99",
},
],
main_heating_controls: ["Thermostat"]
},
}

Expand Down Expand Up @@ -3817,7 +3822,8 @@
typical_saving: "99",
},
],
photo_supply: "0"
photo_supply: "0",
main_heating_controls: ["Thermostat"]
},
}

Expand Down Expand Up @@ -3937,6 +3943,7 @@
typical_saving: "99",
},
],
main_heating_controls: ["Thermostat"]
},
}

Expand Down Expand Up @@ -4053,7 +4060,8 @@
typical_saving: "99",
},
],
photo_supply: "0"
photo_supply: "0",
main_heating_controls: ["Thermostat"]
},
}

Expand Down Expand Up @@ -4173,6 +4181,7 @@
typical_saving: "99",
},
],
main_heating_controls: ["Thermostat"]
},
}

Expand Down Expand Up @@ -4290,7 +4299,8 @@
typical_saving: "99",
},
],
photo_supply: "0"
photo_supply: "0",
main_heating_controls: ["Thermostat"]
},
}

Expand Down Expand Up @@ -4473,7 +4483,8 @@
typical_saving: "99",
},
],
photo_supply: nil
photo_supply: nil,
main_heating_controls: ["Thermostat", "Thermostat"]
}
end

Expand Down

0 comments on commit 706b61c

Please sign in to comment.