Skip to content

Commit

Permalink
PC-577: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Glenn-Clarke committed Nov 27, 2024
1 parent a4d2c9d commit eae10c9
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ private PropertyData InitializePropertyData()
Temperature = 20,
UneditedData = new PropertyData(),
HasSeenRecommendations = false,
SolarElectricPanels = SolarElectricPanels.Yes,
RecommendationsFirstRetrievedAt = DateTime.Now.ToUniversalTime(),
PropertyRecommendations = new List<PropertyRecommendation>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ public void RunResetUnusedFieldTestCases(ResetUnusedFieldsTestCase testCase)
FlatType = FlatType.GroundFloor,
RoofConstruction = RoofConstruction.Mixed,
LoftSpace = LoftSpace.Yes,
RoofInsulated = RoofInsulated.Yes
RoofInsulated = RoofInsulated.Yes,
SolarElectricPanels = SolarElectricPanels.Yes
},
new()
{
Expand All @@ -137,7 +138,8 @@ public void RunResetUnusedFieldTestCases(ResetUnusedFieldsTestCase testCase)
FloorInsulated = FloorInsulated.Yes,
RoofConstruction = RoofConstruction.Mixed,
LoftSpace = LoftSpace.Yes,
RoofInsulated = RoofInsulated.Yes
RoofInsulated = RoofInsulated.Yes,
SolarElectricPanels = SolarElectricPanels.Yes
},
new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,30 @@ public void RunSkipLinkTestCases(QuestionFlowServiceTestCase testCase)
),
QuestionFlowStep.AnswerSummary),
new(
"Loft space goes back to roof construction",
"Solar (PV) panels goes back to roof construction",
new Input(
QuestionFlowStep.SolarElectricPanels,
propertyType: PropertyType.ApartmentFlatOrMaisonette,
flatType: FlatType.TopFloor,
wallConstruction: WallConstruction.DoNotKnow,
reference: "ABCDEFGH"
),
QuestionFlowStep.RoofConstruction),
new(
"Changing solar (PV) panels goes back to summary",
new Input(
QuestionFlowStep.SolarElectricPanels,
"ABCDEFGH",
entryPoint: QuestionFlowStep.SolarElectricPanels
),
QuestionFlowStep.AnswerSummary),
new(
"Loft space goes back to solar (PV) panels",
new Input(
QuestionFlowStep.LoftSpace,
"ABCDEFGH"
),
QuestionFlowStep.RoofConstruction),
QuestionFlowStep.SolarElectricPanels),
new(
"Changing loft space goes back to summary",
new Input(
Expand Down Expand Up @@ -447,14 +465,14 @@ public void RunSkipLinkTestCases(QuestionFlowServiceTestCase testCase)
),
QuestionFlowStep.AnswerSummary),
new(
"Glazing type goes back to roof construction if the user has flat roof",
"Glazing type goes back to solar (PV) panels if the user has flat roof",
new Input(
QuestionFlowStep.GlazingType,
"ABCDEFGH",
propertyType: PropertyType.House,
roofConstruction: RoofConstruction.Flat
),
QuestionFlowStep.RoofConstruction),
QuestionFlowStep.SolarElectricPanels),
new(
"Glazing type goes back to loft space if the user does not have flat roof nor loft space",
new Input(
Expand Down Expand Up @@ -1060,38 +1078,53 @@ public void RunSkipLinkTestCases(QuestionFlowServiceTestCase testCase)
),
QuestionFlowStep.GlazingType),
new(
"Roof construction continues to loft space if roof is pitched",
"Roof construction continues to solar (PV) panels",
new Input(
QuestionFlowStep.RoofConstruction,
"ABCDEFGH"
),
QuestionFlowStep.SolarElectricPanels),
new(
"Changing roof construction continues to summary if roof is not pitched",
new Input(
QuestionFlowStep.RoofConstruction,
"ABCDEFGH",
roofConstruction: RoofConstruction.Flat,
entryPoint: QuestionFlowStep.RoofConstruction
),
QuestionFlowStep.AnswerSummary),
new(
"Solar (PV) panels continues to loft space if roof is pitched",
new Input(
QuestionFlowStep.SolarElectricPanels,
"ABCDEFGH",
roofConstruction: RoofConstruction.Pitched
),
QuestionFlowStep.LoftSpace),
new(
"Roof construction continues to loft space if roof is mixed",
"Solar (PV) panels continues to loft space if roof is mixed",
new Input(
QuestionFlowStep.RoofConstruction,
QuestionFlowStep.SolarElectricPanels,
"ABCDEFGH",
roofConstruction: RoofConstruction.Mixed
),
QuestionFlowStep.LoftSpace),
new(
"Changing roof construction continues to summary if roof is not pitched",
"Solar (PV) panels continues to glazing type space if roof is not pitched",
new Input(
QuestionFlowStep.RoofConstruction,
QuestionFlowStep.SolarElectricPanels,
"ABCDEFGH",
roofConstruction: RoofConstruction.Flat,
entryPoint: QuestionFlowStep.RoofConstruction
roofConstruction: RoofConstruction.Flat
),
QuestionFlowStep.AnswerSummary),
QuestionFlowStep.GlazingType),
new(
"Roof construction continues to glazing type space if roof is not pitched",
"Changing solar (PV) panels continues to summary",
new Input(
QuestionFlowStep.RoofConstruction,
QuestionFlowStep.SolarElectricPanels,
"ABCDEFGH",
roofConstruction: RoofConstruction.Flat
entryPoint: QuestionFlowStep.SolarElectricPanels
),
QuestionFlowStep.GlazingType),
QuestionFlowStep.AnswerSummary),
new(
"Loft space continues to loft access if user has it",
new Input(
Expand Down

0 comments on commit eae10c9

Please sign in to comment.