Give each school its own people seed so composition no longer follows create order.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -139,14 +139,14 @@ public class PeopleApiTests(AppHostFixture fixture)
|
||||
{
|
||||
using var client = fixture.App.CreateHttpClient("server");
|
||||
await SchoolApiTests.ResetAsync(client);
|
||||
var school = await SchoolApiTests.CreateAsync(client, "Люди семья", Start);
|
||||
var school = await SchoolApiTests.CreateAsync(client, "Люди семья", Start, seed: 1);
|
||||
|
||||
var page = await GetPeopleAsync(client, school.Id, "role=student&year=5&pageSize=10");
|
||||
|
||||
// Every fifth-to-tenth family is single-parent on purpose (design/people.md), and the
|
||||
// roster seed is the school id — which depends on how many schools ran before this test.
|
||||
// Demanding two parents from whoever happens to sort first therefore fails on some runs;
|
||||
// look for a pupil who has a mother instead of assuming the first one does.
|
||||
// Every fifth-to-tenth family is single-parent on purpose (design/people.md). The roster
|
||||
// seed is no longer the school id, but a given page still mixes complete and single-parent
|
||||
// houses, so demanding two parents from whoever sorts first fails on some seeds. Look for
|
||||
// a pupil who has a mother instead of assuming the first one does.
|
||||
PersonCardResponse? card = null;
|
||||
foreach (var candidate in page.People)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user