Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsDAO uses correct flag now #1007

Merged
merged 4 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
});

Expand All @@ -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;
});

Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ 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";
x.Urn = project.Urn;
});

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
Expand All @@ -48,15 +52,15 @@ 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";
x.Urn = project.Urn;
});

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public async Task<IViewComponentResult> 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,
Expand Down
Loading