D1, correzioni della revisione: conteggi della Libreria più rapidi, frecce che seguono le tessere, Dashboard nei testi
- /api/library/days in «Tutte le foto» faceva due volte il passaggio su tutta la tabella media a ogni aggiornamento del mosaico: il totale dei file è ora la somma dei giorni (CountLibraryFilesAsync tolto). - I totali e i conteggi per giorno di «Foto» e «Video» su tutta la libreria non pagano più un EXISTS per post (1,3-1,6 s): elenco degli elementi con file di quel tipo su un indice di copertura, 86-141 ms su 200.000 elementi; nuove misure con limite 600 ms in LibraryScaleTests. - La quota di chi aspetta non è un minimo per tipo: corretti commento e decisioni, prova con un arretrato più vecchio di un altro tipo. - Visualizzatore in «Tutte le foto»: le frecce saltano i file che non sono tessere (foto sotto «Video» e simili) e l'intestazione non dà il numero di un altro file; la voce già scelta dell'interruttore non ridisegna il mosaico. Prova d'interfaccia nuova (solo CI). - «Ricetta sospesa» dice di riattivarla dalla Dashboard, non da Attività; commenti aggiornati. - Nomi accessibili distinti nella scheda account, variabile in inglese in download-order.js, icona activity tolta perché nessuna pagina la usa. - Schermate 06, 11 e 14 rifatte con /dashboard e nuova 01-libreria-tutte-le-foto, confrontate con i mockup in docs/schermate/differenze.md (con quattro difetti visivi ancora da sistemare). - LEGGIMI del web (mode, cursore, files, moduli riusabili) e guida della Libreria (la scelta del mosaico resta nel browser, a differenza del tema). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
30e159cbd4
commit
58ff4e48b3
44 files changed
+261
-118
No files matched your search
@@ -66,6 +66,41 @@ public sealed class LibraryModeInterfaceTests
|
||||
Assert.AreEqual("grouped", (await ui.EvalAsync(Mode)).GetString(), "le viste degli account hanno la loro scelta");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task UnderVideoTheArrowsFollowTheTilesAndTheChosenVoiceChangesNothing()
|
||||
{
|
||||
await using var ui = await UiBrowser.StartAsync(1440, 900);
|
||||
using var temp = new TempFolder("modo-video-ui");
|
||||
await using var demo = await DemoHost.StartAsync(new DemoOptions(0, TestZones.Rome, temp.Path));
|
||||
|
||||
await ui.OpenAsync(new Uri(demo.Address, "/libreria?tipo=video"));
|
||||
await ui.WaitAsync($"{Switch} !== null && document.querySelector('.mosaico .tess') !== null", "Libreria con «Video»");
|
||||
await ui.EvalAsync($"{Switch}.querySelector('[data-value=files]').click()");
|
||||
|
||||
// A video that is the second file of its post (the first is a photo, no tile under «Video»), not the first tile.
|
||||
const string Second = "[...document.querySelectorAll('.mosaico .tess')].slice(1).find((t) => /^2\\/\\d+$/.test(t.querySelector('.segno span')?.textContent || ''))";
|
||||
await ui.WaitAsync($"({Second}) !== undefined", "un video in seconda posizione " + ui.Report());
|
||||
|
||||
// Clicking the voice already chosen keeps the mosaic, its place and the selection.
|
||||
await ui.EvalAsync("document.querySelector('.mosaico').dataset.prova = 'stesso'");
|
||||
await ui.EvalAsync($"{Switch}.querySelector('[data-value=files]').click()");
|
||||
Assert.AreEqual("stesso", (await ui.EvalAsync("document.querySelector('.mosaico')?.dataset.prova || ''")).GetString(), "«Tutte le foto» di nuovo non ridisegna il mosaico");
|
||||
|
||||
await ui.EvalAsync($"({Second}).click()");
|
||||
await ui.WaitAsync("document.querySelector('.vis .scena video') !== null && /file/.test(document.querySelector('.vis .dove').textContent)", "visualizzatore sul video");
|
||||
const string Index = "Number((document.querySelector('.vis .dove').textContent.match(/file ([\\d.]+)/) || [])[1]?.replace(/\\./g, '') || 0)";
|
||||
var at = (await ui.EvalAsync(Index)).GetInt32();
|
||||
Assert.IsGreaterThan(1, at, ui.Report());
|
||||
|
||||
// Left: the photo before it is not a tile, so the viewer goes to the tile before, a video of another post.
|
||||
await ui.EvalAsync("document.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowLeft', bubbles: true }))");
|
||||
await ui.WaitAsync($"{Index} === {at - 1}", "la freccia va alla tessera precedente");
|
||||
await ui.WaitAsync("document.querySelector('.vis .scena video') !== null", "di nuovo un video, mai la foto filtrata");
|
||||
await ui.EvalAsync("document.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight', bubbles: true }))");
|
||||
await ui.WaitAsync($"{Index} === {at}", "e torna");
|
||||
Assert.IsTrue((await ui.EvalAsync("document.querySelector('.vis .scena video') !== null")).GetBoolean());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task WithoutTheBrowserStorageTheMosaicIsGrouped()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user