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:
@@ -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++)
|
||||
|
||||
Reference in New Issue
Block a user