fix: gaps and cores pages count from the data

The gaps page said the exporter regenerates each platform's file, which it patches, and opened on 48 missing above a heading of 10 files. The provenance total sat above three lists that add up to more, and the cores page counted every profile as run by the platforms.
This commit is contained in:
Abdessamad Derraz committed 2026-11-03 10:17:09 +01:00
1 parent e9ef630b3a
commit cfe9edb3a1
2 files changed
+50 -16

No files matched your search

+13
View File
@@ -5002,6 +5002,19 @@ class GapsPageCountsOneWay(unittest.TestCase):
self.assertIn("Other revisions of a held destination", text)
self.assertIn("`cdibios.zip`", text)
def test_missing_says_the_destination_count_of_the_opening_sentence(self):
# The page opened on "48 are missing" (by destination) above a
# heading that said "10 files": one row per name.
from scripts.generate_site import _render_problem_files
problems = [{"platform": "AmberELEC", "name": "hardwareconfig.xml",
"status": "missing", "required": True, "reason": "",
"discrepancy": "", "category": "unread"}] * 3
text = "\n".join(_render_problem_files(problems, missing_total=3))
self.assertIn("3 missing under 1 name,", text)
self.assertIn('rb-badge-danger">1 name</span>', text)
self.assertNotIn("1 missing", text)
def test_verify_marks_the_settled_entry(self):
sys.path.insert(0, str(ROOT / "scripts"))
import verify