Close phase 36 apparel-changed log tail.

Add simulation and paged day-log tests; mark the log task complete in the phase doc.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 05:44:09 +03:00
co-authored by Cursor
parent 3fa6ce95df
commit 3485ce8ac4
3 changed files with 53 additions and 2 deletions
@@ -99,6 +99,25 @@ public class PersonDayLogTests
Assert.Equal("UseToilet", page.Entries[0].ThingDef);
}
[Fact]
public void ApparelReplaced_FlowsThroughPagedLog()
{
using var school = OpenEmpty(TuesdayNoon);
var person = school.Roster!.People.First();
school.AppendDayLog(new PersonLogEvent(person.Id, TuesdayNoon, PersonLogTypes.ApparelReplaced, "Shirt"));
var page = PersonLogBrowser.Apply(
school.DayLog,
person.Id,
new PersonLogQuery(null, Descending: true, Page: 1, PageSize: 20),
school.Catalog,
"ru");
Assert.Single(page.Entries);
Assert.Equal(PersonLogTypes.ApparelReplaced, page.Entries[0].Type);
Assert.StartsWith("получил новую ", page.Entries[0].Label, StringComparison.Ordinal);
}
private static void TickMinutes(School school, int minutes)
{
for (var i = 0; i < minutes; i++)