From a0a7d5594c4fca44c0dc71e804af3eac70b35adb Mon Sep 17 00:00:00 2001 From: Owen Yamauchi Date: Tue, 21 May 2024 17:51:50 -0400 Subject: [PATCH 1/2] Remove deprecated v1 items ## Description The backend is about to stop supporting these items, so don't send them up. ## Test Plan Ran against local backend with and without the change that removes these items; make sure the results are the same (for HVAC and weatherization projects) in both cases, and there are no errors. --- src/api/calculator-types-v1.ts | 2 -- src/item-name.ts | 5 ----- src/projects.tsx | 2 -- 3 files changed, 9 deletions(-) diff --git a/src/api/calculator-types-v1.ts b/src/api/calculator-types-v1.ts index 8cf0ec9..9c38f25 100644 --- a/src/api/calculator-types-v1.ts +++ b/src/api/calculator-types-v1.ts @@ -49,7 +49,6 @@ export const ITEMS = [ 'energy_audit', 'floor_insulation', 'geothermal_heating_installation', - 'heat_pump_air_conditioner_heater', 'heat_pump_clothes_dryer', 'heat_pump_water_heater', 'new_electric_vehicle', @@ -63,7 +62,6 @@ export const ITEMS = [ 'used_electric_vehicle', 'used_plugin_hybrid_vehicle', 'wall_insulation', - 'weatherization', 'window_replacement', ] as const; diff --git a/src/item-name.ts b/src/item-name.ts index d8b004d..cdec57d 100644 --- a/src/item-name.ts +++ b/src/item-name.ts @@ -30,7 +30,6 @@ const ALL_WEATHERIZATION: ItemType[] = [ 'door_replacement', 'duct_replacement', 'duct_sealing', - 'weatherization', 'window_replacement', 'efficiency_rebates', 'other_weatherization', @@ -250,8 +249,6 @@ export const itemName = (items: ItemType[], msg: MsgFn) => { return msg('geothermal heating installation', { desc: 'e.g. "$100 off [this string]"', }); - case 'heat_pump_air_conditioner_heater': - return msg('a heat pump', { desc: 'e.g. "$100 off [this string]"' }); case 'heat_pump_clothes_dryer': return msg('a heat pump clothes dryer', { desc: 'e.g. "$100 off [this string]"', @@ -294,8 +291,6 @@ export const itemName = (items: ItemType[], msg: MsgFn) => { }); case 'wall_insulation': return msg('wall insulation', { desc: 'e.g. "$100 off [this string]"' }); - case 'weatherization': - return msg('weatherization', { desc: 'e.g. "$100 off [this string]"' }); case 'window_replacement': return msg('window replacement', { desc: 'e.g. "$100 off [this string]"', diff --git a/src/projects.tsx b/src/projects.tsx index 256538b..c4f37d4 100644 --- a/src/projects.tsx +++ b/src/projects.tsx @@ -51,7 +51,6 @@ export const PROJECTS: Record = { 'ductless_heat_pump', 'geothermal_heating_installation', 'other_heat_pump', - 'heat_pump_air_conditioner_heater', ], label: msg => msg('Heating, ventilation & cooling'), shortLabel: msg => @@ -113,7 +112,6 @@ export const PROJECTS: Record = { 'duct_sealing', 'floor_insulation', 'wall_insulation', - 'weatherization', 'window_replacement', 'efficiency_rebates', 'other_insulation', From 5cc9884b1129354c17d9d8fb4f9b59b8ff49836d Mon Sep 17 00:00:00 2001 From: Owen Yamauchi Date: Wed, 22 May 2024 14:38:24 -0400 Subject: [PATCH 2/2] update cypress test --- cypress/e2e/state-calculator.cy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/state-calculator.cy.ts b/cypress/e2e/state-calculator.cy.ts index 0f04530..d982891 100644 --- a/cypress/e2e/state-calculator.cy.ts +++ b/cypress/e2e/state-calculator.cy.ts @@ -59,11 +59,11 @@ describe('rewiring-america-state-calculator', () => { cy.get('rewiring-america-state-calculator') .shadow() - .contains('$1,000/ton off a heat pump'); + .contains('$1,000/ton off an air source heat pump'); cy.get('rewiring-america-state-calculator') .shadow() - .contains('$350/ton off a heat pump'); + .contains('$350/ton off a ducted heat pump'); cy.get('rewiring-america-state-calculator') .shadow() @@ -71,7 +71,7 @@ describe('rewiring-america-state-calculator', () => { cy.get('rewiring-america-state-calculator') .shadow() - .contains('$2,000 off a heat pump'); + .contains('$2,000 off an air source heat pump'); cy.get('rewiring-america-state-calculator') .shadow()