Interfaccia: correzioni della revisione (web-1, web-2, web-3, web-4, web-5, web-6, web-7, web-9, web-10, web-11, web-12, web-13, web-14, web-15)

Il browser preso dalle pagine Browser e Collegamento si restituisce uscendo senza «Ho finito» (anche chiudendo o ricaricando la scheda); dopo «Ho finito» la vista remota si chiude e non si riprende il browser. Vista remota: AltGr/Option come testo, pulsante rilasciato anche fuori dalla vista. Mosaico e scheda account senza risposte vecchie né viste sovrascritte; nuovi elementi dopo la libreria vuota; intestazione sempre aggiornata. Indietro del browser con la richiesta delle modifiche non salvate; nulla resta registrato da una pagina lasciata mentre caricava; maniglie della fascia trascinabili. «Da una data» come giorno locale; niente «@null» nel riquadro di stato; orari futuri dei fermi «verso le». Prove nel browser vero (InterfaceTests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
Claude committed 2026-10-14 01:38:13 +00:00
1 parent 78c92eb2a4
commit 0ceffffe50
27 files changed
+1365 -59

No files matched your search

+39
View File
@@ -136,6 +136,45 @@ public sealed class AccountsApiTests
"in Docker (the default shell of the tests) folders are read-only");
}
[TestMethod]
public void FromDateIsTheLocalDayAndSurvivesARoundTrip()
{
// «Solo i nuovi da oggi» in Rome: local midnight of 13 October is 12 October 22:00 UTC.
var rome = TestZones.Rome;
var account = Account.Create("marta.demo", StartingPoint.OnlyNewFromToday, Make.T0, rome);
Assert.AreEqual(new DateTimeOffset(2026, 10, 12, 22, 0, 0, TimeSpan.Zero), account.Limits.FromDate);
var form = Febe.Web.Api.AccountSettingsMapper.ToDto(account, rome);
Assert.AreEqual("2026-10-13", form.FromDate, "the form shows the day Alberto chose");
var again = Febe.Web.Api.AccountSettingsMapper.Apply(account, form, rome, Make.T0, account.Folder);
Assert.AreEqual(account.Limits.FromDate, again.Limits.FromDate, "saving the form as it is changes nothing");
}
[TestMethod]
public async Task TheKeepUpdatedSwitchAndSavingDoNotMoveTheStartingDay()
{
await using var server = await WebTestServer.StartAsync();
var account = await server.Db.Accounts.AddAsync(Account.Create("anna.demo", StartingPoint.OnlyNewFromToday, Make.T0, server.Clock.LocalZone));
var from = account.Limits.FromDate;
Assert.IsNotNull(from);
var detail = await server.GetJsonAsync($"/api/accounts/{account.Id}");
Assert.AreEqual("2026-10-13", detail.GetProperty("settings").Str("fromDate"));
foreach (var value in new[] { false, true, false, true })
{
var (status, _) = await server.SendJsonAsync(HttpMethod.Post, $"/api/accounts/{account.Id}/keep-updated", new { value });
Assert.AreEqual(HttpStatusCode.OK, status);
}
Assert.AreEqual(from, (await server.Db.Accounts.GetAsync(account.Id))!.Limits.FromDate, "«Tieni aggiornato» does not move «Da una data»");
var settings = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>((await server.GetJsonAsync($"/api/accounts/{account.Id}")).GetProperty("settings").GetRawText())!;
var (saveStatus, saved) = await server.SendJsonAsync(HttpMethod.Put, $"/api/accounts/{account.Id}/settings", settings);
Assert.AreEqual(HttpStatusCode.OK, saveStatus);
Assert.AreEqual("2026-10-13", saved.GetProperty("settings").Str("fromDate"));
Assert.AreEqual(from, (await server.Db.Accounts.GetAsync(account.Id))!.Limits.FromDate, "saving the settings as they are does not move it either");
}
[TestMethod]
public async Task AccountsAreAddedFromTheFollowedListOrByNameWithAStartingPoint()
{