Skip to content

Commit

Permalink
Final finance plan new field - Added any underwritten places to the f…
Browse files Browse the repository at this point in the history
…inance plan (#990)
  • Loading branch information
jack-nimbleapproach authored Jan 15, 2025
1 parent f32bb94 commit b7a2663
Show file tree
Hide file tree
Showing 13 changed files with 13,052 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class FinalFinancePlanTask
public bool? ConfirmedTrustHasProvidedFinalPlan { get; set; }
public DateTime? Grade6SignedOffFinalPlanDate { get; set; }
public bool? SentFinalPlanToRevenueFundingMailbox { get; set; }
public bool? AddedAnyUnderwrittenPlacesToFinalPlan { get; set; }
public bool? SavedFinalPlanInWorkplacesFolder { get; set; }
public DateTime? ExpectedDateGrade6WillSignOffTheFinalPlan { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public async Task Patch_NewFinalFinancePlanTask_Returns_200()
projectResponse.FinalFinancePlan.ConfirmedTrustHasProvidedFinalPlan.Should().Be(true);
projectResponse.FinalFinancePlan.Grade6SignedOffFinalPlanDate.Should().Be(signoffDate);
projectResponse.FinalFinancePlan.SentFinalPlanToRevenueFundingMailbox.Should().BeNull();
projectResponse.FinalFinancePlan.AddedAnyUnderwrittenPlacesToFinalPlan.Should().BeNull();
projectResponse.FinalFinancePlan.SavedFinalPlanInWorkplacesFolder.Should().BeNull();

}
Expand Down Expand Up @@ -68,6 +69,7 @@ public async Task Patch_ExistingFinalFinancePlanTask_Returns_200()
ConfirmedTrustHasProvidedFinalPlan = true,
Grade6SignedOffFinalPlanDate = signoffDate,
SentFinalPlanToRevenueFundingMailbox = true,
AddedAnyUnderwrittenPlacesToFinalPlan = true,
SavedFinalPlanInWorkplacesFolder = true

}
Expand All @@ -77,6 +79,7 @@ public async Task Patch_ExistingFinalFinancePlanTask_Returns_200()
projectResponse.FinalFinancePlan.ConfirmedTrustHasProvidedFinalPlan.Should().Be(true);
projectResponse.FinalFinancePlan.Grade6SignedOffFinalPlanDate.Should().Be(signoffDate);
projectResponse.FinalFinancePlan.SentFinalPlanToRevenueFundingMailbox.Should().Be(true);
projectResponse.FinalFinancePlan.AddedAnyUnderwrittenPlacesToFinalPlan.Should().Be(true);
projectResponse.FinalFinancePlan.SavedFinalPlanInWorkplacesFolder.Should().Be(true);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public static FinalFinancePlanTask Build(Milestones milestones)
ConfirmedTrustHasProvidedFinalPlan = milestones.FsgPreOpeningMilestonesFfpConfirmedTrustHasProvidedFinalPlan,
Grade6SignedOffFinalPlanDate = milestones.FsgPreOpeningMilestonesFpaActualDateOfCompletion,
SentFinalPlanToRevenueFundingMailbox = milestones.FsgPreOpeningMilestonesFfpSentFinalPlanToRevenueFundingMailbox,
AddedAnyUnderwrittenPlacesToFinalPlan = milestones.FsgPreOpeningMilestonesFfpAddedAnyUnderwrittenPlacesToFinalPlan,
SavedFinalPlanInWorkplacesFolder = milestones.FsgPreOpeningMilestonesFfpSavedFinalPlanInWorkplacesFolder
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public async Task Update(UpdateTaskServiceParameters parameters)
milestone.FsgPreOpeningMilestonesFfpConfirmedTrustHasProvidedFinalPlan = task.ConfirmedTrustHasProvidedFinalPlan;
milestone.FsgPreOpeningMilestonesFpaActualDateOfCompletion = task.Grade6SignedOffFinalPlanDate;
milestone.FsgPreOpeningMilestonesFfpSentFinalPlanToRevenueFundingMailbox = task.SentFinalPlanToRevenueFundingMailbox;
milestone.FsgPreOpeningMilestonesFfpAddedAnyUnderwrittenPlacesToFinalPlan = task.AddedAnyUnderwrittenPlacesToFinalPlan;
milestone.FsgPreOpeningMilestonesFfpSavedFinalPlanInWorkplacesFolder = task.SavedFinalPlanInWorkplacesFolder;

await _context.SaveChangesAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ describe("Testing Final finance plan Task", () => {
.titleIs("Final finance plan")
.inOrder()
.summaryShows("Expected date that the Grade 6 will sign-off the final plan").IsEmpty().HasChangeLink()
.summaryShows("Confirmed that the trust has provided the final plan").IsEmpty().HasChangeLink()
.summaryShows("Actual date the Grade 6 signed-off the final plan").IsEmpty().HasChangeLink()
.summaryShows("Confirmed that the trust has provided the final plan").IsEmpty().HasChangeLink()
.summaryShows("Sent the final plan to the Revenue Funding mailbox").IsEmpty().HasChangeLink()
.summaryShows("Added any underwritten places to the finance plan").IsEmpty().HasChangeLink()
.summaryShows("Saved final plan in Workplaces folder").IsEmpty().HasChangeLink()
.isNotMarkedAsComplete();

Expand Down Expand Up @@ -94,6 +95,7 @@ describe("Testing Final finance plan Task", () => {
.checkConfirmedTrustHasProvidedFinalPlan()
.withGrade6SignedOffFinalPlanDate("2","2","2050")
.checkSentFinalPlanToRevenueFundingMailbox()
.checkAddedAnyUnderwrittenPlacesToFinalPlan()
.checkSavedFinalPlanInWorkplacesFolder()
.clickContinue()

Expand All @@ -102,9 +104,10 @@ describe("Testing Final finance plan Task", () => {
.titleIs("Final finance plan")
.inOrder()
.summaryShows("Expected date that the Grade 6 will sign-off the final plan").HasValue("2 February 2050").HasChangeLink()
.summaryShows("Confirmed that the trust has provided the final plan").HasValue("Yes").HasChangeLink()
.summaryShows("Actual date the Grade 6 signed-off the final plan").HasValue("2 February 2050").HasChangeLink()
.summaryShows("Confirmed that the trust has provided the final plan").HasValue("Yes").HasChangeLink()
.summaryShows("Sent the final plan to the Revenue Funding mailbox").HasValue("Yes").HasChangeLink()
.summaryShows("Added any underwritten places to the finance plan").HasValue("Yes").HasChangeLink()
.summaryShows("Saved final plan in Workplaces folder").HasValue("Yes").HasChangeLink()

cy.log("Unselect checkboxes")
Expand All @@ -113,6 +116,7 @@ describe("Testing Final finance plan Task", () => {
finalFinancePlanEditPage
.uncheckConfirmedTrustHasProvidedFinalPlan()
.uncheckSentFinalPlanToRevenueFundingMailbox()
.uncheckAddedAnyUnderwrittenPlacesToFinalPlan()
.uncheckSavedFinalPlanInWorkplacesFolder()
.clickContinue()

Expand All @@ -122,9 +126,10 @@ describe("Testing Final finance plan Task", () => {
.titleIs("Final finance plan")
.inOrder()
.summaryShows("Expected date that the Grade 6 will sign-off the final plan").HasValue("2 February 2050").HasChangeLink()
.summaryShows("Actual date the Grade 6 signed-off the final plan").HasValue("2 February 2050").HasChangeLink()
.summaryShows("Confirmed that the trust has provided the final plan").IsEmpty().HasChangeLink()
.summaryShows("ctual date the Grade 6 signed-off the final plan").HasValue("2 February 2050").HasChangeLink()
.summaryShows("Sent the final plan to the Revenue Funding mailbox").IsEmpty().HasChangeLink()
.summaryShows("Added any underwritten places to the finance plan").IsEmpty().HasChangeLink()
.summaryShows("Saved final plan in Workplaces folder").IsEmpty().HasChangeLink()
.isNotMarkedAsComplete()
.MarkAsComplete()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ class FinalFinancePlanEditPage {
return this
}

checkAddedAnyUnderwrittenPlacesToFinalPlan(): this {
cy.getById("added-any-underwritten-places-to-the-finance-plan").check()
return this
}

uncheckAddedAnyUnderwrittenPlacesToFinalPlan(): this {
cy.getById("added-any-underwritten-places-to-the-finance-plan").uncheck()
return this
}

checkSavedFinalPlanInWorkplacesFolder(): this {
cy.getById("saved-final-plan-in-workplaces-folder").check()
return this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public partial class Milestones
public bool? FsgPreOpeningMilestonesFfpConfirmedTrustHasProvidedFinalPlan { get; set; }
public DateTime? FsgPreOpeningMilestonesFfpGrade6SignedOffFinalPlanDate { get; set; }
public bool? FsgPreOpeningMilestonesFfpSentFinalPlanToRevenueFundingMailbox { get; set; }
public bool? FsgPreOpeningMilestonesFfpAddedAnyUnderwrittenPlacesToFinalPlan { get; set; }
public bool? FsgPreOpeningMilestonesFfpSavedFinalPlanInWorkplacesFolder { get; set; }

public bool? FsgPreOpeningMilestonesSchoolReceivedEnoughApplications { get; set; }
Expand Down
Loading

0 comments on commit b7a2663

Please sign in to comment.