fix core report inspection and vendored roots

This commit is contained in:
thanhnv
2026-07-29 12:29:18 +07:00
parent 1d6384d23c
commit 67d482ae7f
7 changed files with 64 additions and 2 deletions
@@ -11,6 +11,7 @@ import unittest
MODULE = Path(__file__).resolve().parents[1] / "scripts" / "python" / "local_report.py"
APP_JS = Path(__file__).resolve().parents[1] / "assets" / "local-viewer" / "app.js"
SPEC = importlib.util.spec_from_file_location("casan_local_report", MODULE)
REPORT = importlib.util.module_from_spec(SPEC)
assert SPEC.loader
@@ -153,6 +154,13 @@ class LocalReportTests(unittest.TestCase):
self.assertEqual(report["verdict"], "not_found")
self.assertFalse(report["source"]["trace_found"])
def test_trace_inspection_reveals_the_loaded_dossier(self):
script = APP_JS.read_text(encoding="utf-8")
self.assertIn('id="run-dossier"', script)
self.assertIn('tabindex="-1"', script)
self.assertIn('dossier.focus({ preventScroll: true })', script)
self.assertIn("dossier.scrollIntoView({", script)
if __name__ == "__main__":
unittest.main()