diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/ConfirmSchoolAndTrustInformationIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/ConfirmSchoolAndTrustInformationIntegrationTests.cs index 3234582db..038e7ff82 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/ConfirmSchoolAndTrustInformationIntegrationTests.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/ConfirmSchoolAndTrustInformationIntegrationTests.cs @@ -217,7 +217,11 @@ public async Task Should_navigate_between_task_list_and_school_and_trust_informa [Fact] public async Task Should_display_the_dao_pack_sent_date_row_if_the_project_is_a_directed_academy_order() { - AcademyConversionProject project = AddGetProject(project => project.ApplicationReceivedDate = null); + AcademyConversionProject project = AddGetProject(project => + { + project.ApplicationReceivedDate = null; + project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored; + }); await OpenAndConfirmPathAsync($"/task-list/{project.Id}"); await NavigateAsync("Conversion details"); @@ -232,6 +236,7 @@ public async Task Should_display_empty_for_the_dao_date_if_it_has_not_been_provi AcademyConversionProject project = AddGetProject(project => { project.ApplicationReceivedDate = null; + project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored; project.DaoPackSentDate = null; }); @@ -249,6 +254,7 @@ public async Task Should_display_the_dao_pack_sent_date_if_it_has_been_provided( AcademyConversionProject project = AddGetProject(project => { project.ApplicationReceivedDate = null; + project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored; project.DaoPackSentDate = yesterday; }); @@ -273,7 +279,13 @@ public async Task Should_not_display_the_dao_pack_sent_date_row_if_the_project_i [Fact] public async Task Should_navigate_to_dao_pack_sent_date_edit_screen_when_the_change_link_is_clicked() { - AcademyConversionProject project = AddGetProject(project => project.ApplicationReceivedDate = null); + AcademyConversionProject project = AddGetProject(project => + { + project.ApplicationReceivedDate = null; + project.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored; + } + ); + await OpenAndConfirmPathAsync($"/task-list/{project.Id}"); await NavigateAsync("Conversion details"); diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/Form7ReceivedIntegrationTests.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/Form7ReceivedIntegrationTests.cs index e7986f697..362e69591 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/Form7ReceivedIntegrationTests.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions.Tests/Pages/TaskList/SchoolAndTrustInformation/Form7ReceivedIntegrationTests.cs @@ -15,7 +15,11 @@ public Form7ReceivedIntegrationTests(IntegrationTestingWebApplicationFactory fac [Fact] public async Task Should_navigate_to_and_update_form_7_received() { - AcademyConversionProject project = AddGetProject(p => p.ApplicationReceivedDate = null); + AcademyConversionProject project = AddGetProject(p => + { + p.ApplicationReceivedDate = null; + p.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored; + }); AddPatchConfiguredProject(project, x => { x.Form7Received = "Yes"; @@ -23,7 +27,7 @@ public async Task Should_navigate_to_and_update_form_7_received() }); await OpenAndConfirmPathAsync($"/task-list/{project.Id}/conversion-details"); - await NavigateAsync("Change", 0); + await NavigateAsync("Change", 1); Document.Url.Should().BeUrl($"/task-list/{project.Id}/confirm-school-trust-information-project-dates/form-7-received"); // Do the input boxes on the page default to none selected when coming from an empty value @@ -48,7 +52,7 @@ public async Task Should_navigate_to_and_update_form_7_received() [Fact] public async Task Should_show_error_summary_when_there_is_an_API_error() { - AcademyConversionProject project = AddGetProject(p => p.ApplicationReceivedDate = null); + AcademyConversionProject project = AddGetProject(p => { p.ApplicationReceivedDate = null; p.AcademyTypeAndRoute = AcademyTypeAndRoutes.Sponsored; }); AddPatchConfiguredProject(project, x => { x.Form7Received = "Yes"; @@ -56,7 +60,7 @@ public async Task Should_show_error_summary_when_there_is_an_API_error() }); await OpenAndConfirmPathAsync($"/task-list/{project.Id}/conversion-details"); - await NavigateAsync("Change", 0); + await NavigateAsync("Change", 1); Document.Url.Should().BeUrl($"/task-list/{project.Id}/confirm-school-trust-information-project-dates/form-7-received"); // Do the input boxes on the page default to none selected when coming from an empty value diff --git a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/SchoolAndTrustInformationViewComponent.cs b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/SchoolAndTrustInformationViewComponent.cs index a9b6ee1d3..2c20cac3b 100644 --- a/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/SchoolAndTrustInformationViewComponent.cs +++ b/Dfe.PrepareConversions/Dfe.PrepareConversions/ViewComponents/SchoolAndTrustInformationViewComponent.cs @@ -33,7 +33,7 @@ public async Task InvokeAsync() SchoolAndTrustInformationViewModel viewModel = new() { Id = project.Id.ToString(), - IsDao = project.ApplicationReceivedDate is null, + IsDao = project.AcademyTypeAndRoute is AcademyTypeAndRoutes.Sponsored, RecommendationForProject = project.RecommendationForProject, Author = project.Author, ClearedBy = project.ClearedBy,