Implement applicant pool functionality in school simulation, allowing for the management of job seekers who are not yet part of the school roster. Update the catalog to include staffing definitions and enhance the API to support applicant data retrieval. Revise the school architecture to handle applicant refresh logic and ensure proper integration with existing roster management. Update tests to validate the new applicant functionalities and ensure robustness in handling staffing scenarios.

This commit is contained in:
Leonid Pershin
2026-08-19 00:01:56 +03:00
parent 65feda3756
commit c189578680
31 changed files with 541 additions and 120 deletions
@@ -64,6 +64,23 @@ public class PeopleApiTests(AppHostFixture fixture)
Assert.Equal("invalid-query", await ProblemCodeAsync(huge));
}
[Fact]
public async Task List_HasPupilsAndParentsButNoStaff()
{
using var client = fixture.App.CreateHttpClient("server");
await SchoolApiTests.ResetAsync(client);
var school = await SchoolApiTests.CreateAsync(client, "Пустой штат", Start);
var students = await GetPeopleAsync(client, school.Id, "role=student&pageSize=10");
var parents = await GetPeopleAsync(client, school.Id, "role=parent&pageSize=10");
var staff = await GetPeopleAsync(client, school.Id, "role=staff&pageSize=10");
Assert.NotEmpty(students.People);
Assert.NotEmpty(parents.People);
Assert.Equal(0, staff.Total);
Assert.Empty(staff.People);
}
[Fact]
public async Task List_UnknownSchool_IsNotFound()
{