Recent
`,
` {#if lib.recents.length}
Jump back in · picks up where you left off
{#each lib.recents.slice(0, 8) as r (r.album_id)}
push("album", { id: r.album_id }, screenEl)} />
{/each}
{/if}
{#if recents.length}
Recent
`);
save();
// ── the mock: a few recents, so Jump back in has something ──
load('src/lib/mockLibrary.js');
rep(` if (cmd === "recent_albums") return Promise.resolve([]);`,
` if (cmd === "recent_albums") return Promise.resolve(albums.slice(0, 3).map((a, i) => ({ kind: "library", album_id: a.id, title: a.title, artist: a.artist, art_path: a.art_path, last_played_at: Math.floor(Date.now() / 1000) - 3600 * (i + 1) })));`);
save();
// ── the walks ──
load('tests/mobile/smoke.mjs');
rep(` rooms: document.querySelectorAll('.screen button.row .art.hash').length,`,
` rooms: document.querySelectorAll('.screen button.row .art.hash').length,
jump: document.querySelectorAll('.screen .rail .release').length,
countline: (document.querySelector('.countline .t-sub') || {}).textContent || '',
firstBadge: (document.querySelector('.grid2 .release .ed-badge') || {}).textContent || '',`);
rep(` "search-recent": (i) => i.title.startsWith("Search") && i.recents >= 1,`,
` "search-recent": (i) => i.title.startsWith("Search") && i.recents >= 1 && i.jump >= 1,`);
rep(` library: (i) => i.title.startsWith("Your library") && i.fmtBadges >= 10,`,
` library: (i) => i.title.startsWith("Your library") && i.fmtBadges >= 10 && /hours/.test(i.countline),`);
rep(` { do: \`document.querySelectorAll('.segtabs button')[1].click()\`, name: "artists", wait: 600 },`,
` /* By format: the hi-res lossless records come first */
{ do: \`__click('.chips .chip', 'By format')\`, name: "library-by-format", wait: 500 },
{ do: \`__click('.chips .chip', 'Recently added')\`, wait: 400 },
{ do: \`document.querySelectorAll('.segtabs button')[1].click()\`, name: "artists", wait: 600 },`);
rep(` artists: (i) => i.title.startsWith("Your library") && i.rowArt >= 3,`,
` "library-by-format": (i) => /^FLAC 24/.test(i.firstBadge),
artists: (i) => i.title.startsWith("Your library") && i.rowArt >= 3,`);
save();
// ── the doc ──
load('ANDROID.md');
rep(`The Library's cards wear the desktop's file stats`, `The Library's count line carries the collection's hours and the sort
offers By format (lossless by depth and rate first, then by bitrate); the
empty Search page shows Jump back in, the desktop's. The Library's cards wear the desktop's file stats`);
save();
console.log('round sixteen wired');