Update decision-making phase and enhance localization for presence tracking
- Marked tasks as complete in the decision-making phase documentation, indicating readiness for implementation. - Updated the README to reflect the completion status of the decision-making phase. - Enhanced localization strings to include new presence tracking features, improving user experience. - Revised the game screen logic to display real-time presence status, including walking states for individuals. - Added tests to validate the new localization strings and presence functionalities, ensuring robust performance.
This commit is contained in:
@@ -180,6 +180,46 @@ public class SchoolApiTests(AppHostFixture fixture)
|
||||
Assert.Contains(ru.Holidays, holiday => holiday.DefName == "SpringBreak");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Catalog_WithAnUnknownMod_IsRejected()
|
||||
{
|
||||
using var client = fixture.App.CreateHttpClient("server");
|
||||
|
||||
using var response = await client.GetAsync("/api/catalog?mods=no-such-mod", TestContext.Current.CancellationToken);
|
||||
|
||||
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
|
||||
Assert.Equal("unknown-mod", await ProblemCodeAsync(response));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A pack id is a folder name that came from a browser. Anything outside the safe alphabet is
|
||||
/// refused as unknown before it can be joined onto a path — on both endpoints that take one.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task ModId_ThatEscapesTheModsFolder_IsRejectedOnBothEndpoints()
|
||||
{
|
||||
using var client = fixture.App.CreateHttpClient("server");
|
||||
await ResetAsync(client);
|
||||
|
||||
using var catalog = await client.GetAsync("/api/catalog?mods=..%2F..%2Fsaves", TestContext.Current.CancellationToken);
|
||||
|
||||
Assert.Equal(HttpStatusCode.BadRequest, catalog.StatusCode);
|
||||
Assert.Equal("unknown-mod", await ProblemCodeAsync(catalog));
|
||||
|
||||
using var create = await client.PostAsJsonAsync(
|
||||
"/api/schools",
|
||||
new
|
||||
{
|
||||
name = "Побег из mods",
|
||||
startDate = ExpectedDefaultStart,
|
||||
modIds = new[] { "../../saves" },
|
||||
},
|
||||
TestContext.Current.CancellationToken);
|
||||
|
||||
Assert.Equal(HttpStatusCode.BadRequest, create.StatusCode);
|
||||
Assert.Equal("unknown-mod", await ProblemCodeAsync(create));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CreateSchool_WithABrokenMap_IsRejected()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user