refactor: Prüfdialog-Text aus dem Controller lösen

Etappe 3 der Controller-Zerlegung. Der komplette Text des Prüfdialogs
(Kopf, Saisonhinweis, Kategorie, Basiswert, Punktschätzung, Wertung,
Prüfliste, Befunde) liegt jetzt in
`src/whiteboard/view/validation_report_view.gd`.

- `ValidationReportView.build(routine, report, category, context)` bekommt
  einen kleinen Kontext für die Anzeige-Optionen und gibt die BBCode-Zeilen
  zurück; der Controller baut nur noch den Report und setzt das Label.
- Mit dem Text wandern die Hilfsfunktionen (Prüfliste-Zeile, Skip-Gründe,
  Fundstelle, Zähl-Labels) in die View. Sie waren nur hier im Einsatz.
- Eigener Test für den Aufbau des Textes (Kopf, Saison, Vergleichslink,
  Kategorie, Basiswert, Prüfliste, Befunde).

Controller: 8.839 -> 8.566 Zeilen. Kein Verhalten geändert, Suite grün.
Nächste Etappe laut Notiz: ExportService.
This commit is contained in:
torsten 2026-11-13 13:25:50 +01:00
parent 1245f438f1
commit a3d35076dc
6 changed files with 374 additions and 296 deletions

View file

@ -43,6 +43,7 @@ func _init() -> void:
_test_jump_sequence()
_test_program_once_features()
_test_missing_rules()
_test_report_view()
_finish()
@ -562,6 +563,42 @@ func _messages(issues: Array[ValidationIssue]) -> String:
return "; ".join(parts)
## Der Dialogtext ist reine Formatierung und damit ohne Szene testbar.
func _test_report_view() -> void:
var routine := _make_routine()
_add_marker(
routine.sections[0],
"spin",
PathSegment.ElementType.SPIN,
"CCoSp",
4,
PackedStringArray(["difficult_variation_sit", "difficult_exit"])
)
var report := _validator.validate_report(routine)
var text := "\n".join(
ValidationReportView.build(
routine,
report,
null,
{
"season": "2026/27",
"season_note": "",
"can_compare": true,
"show_info": false,
"show_assumptions": false,
}
)
)
_check(text.contains("Geprüft:"), "the view has the header line")
_check(text.contains("Saison 2026/27"), "the view names the season")
_check(text.contains("[url=upgrade]"), "the view offers the season comparison")
_check(text.contains("Kategorie: Ohne Kategorie"), "the view reports no category")
_check(text.contains("[b]Basiswert:"), "the view shows the base value")
_check(text.contains("[b]Prüfungen[/b]"), "the view lists the checks")
_check(text.contains("[b]Befunde[/b]"), "the view lists the findings")
func _check(condition: bool, message: String) -> void:
_assertions += 1
if not condition: