Website: „Milyen gép kell?" becomes a main menu item; no „tight from" below 8 GB
gates / gates (push) Successful in 6m42s

The estimator leaves the Apps group and sits right after it, with the sprite's chip icon, on every page of
both languages. The legend's tight-from item and the thin marker hide when that size is below the smallest
named box (it read 2,1 GB on an empty selection); test pinned, red-proved. sizing.js?v=5.
This commit is contained in:
2026-10-13 20:42:32 +02:00
parent 81e64c6fe8
commit cb2d3a54ae
27 changed files with 58 additions and 33 deletions
+12
View File
@@ -169,6 +169,18 @@ class SizingWeb(unittest.TestCase):
self.assertIn("base_mb: boxMb - guestMb", js)
self.assertIn(".replace('{base}', dec(r.base_mb / 1024))", js)
def test_tight_from_hidden_below_the_smallest_box(self):
# „Szűkösen elfér innen: 2,1 GB” on an empty selection named a size nobody can buy: the legend item and the
# thin marker show only when the tight size is at least the smallest named box
small = self.d["boxes_gb"][0]
for name, sel, shown in (("nothing", [], False), ("household", HOUSEHOLD, True)):
peak, _ = estimate(self.d, sel)
self.assertEqual(min_box_gb(self.d, peak) >= small, shown, name)
js = io.open(JS, encoding="utf-8").read()
self.assertIn("var showTight = r.tight_gb >= data.boxes_gb[0];", js)
self.assertIn("if (showTight) { legend.appendChild(tli); }", js)
self.assertIn("tightMark.hidden = !showTight;", js)
def test_grouping_keeps_a_single_leftover_named(self):
by_peak = [a["slug"] for a in sorted((a for a in self.d["apps"] if not a.get("builtin")), key=lambda a: -a["peak_mb"])]
named, grouped = legend_parts(self.d, by_peak[:9])