feat: Pruefdialog nennt Regelwerk und Elementanzahl
- Katalog und Level-Regeln mit Saison und Quelle im Dialogkopf - Zusammenfassung zaehlt die geprueften Elemente - Tooltip am Pruefen-Button nennt die Saisons - Whiteboard-Tests auf 237 Assertions erweitert (870 gesamt)
This commit is contained in:
parent
223a072f5d
commit
b788c1be04
5 changed files with 96 additions and 14 deletions
|
|
@ -191,9 +191,10 @@ Begrenzung auf zwei Features pro Fuß.
|
||||||
Die Timing-Details (Dauer/Tempo/Profil) werden beim Setzen und für
|
Die Timing-Details (Dauer/Tempo/Profil) werden beim Setzen und für
|
||||||
Punktmarker ausgeblendet, damit die Leiste auch im Landscape kompakt bleibt.
|
Punktmarker ausgeblendet, damit die Leiste auch im Landscape kompakt bleibt.
|
||||||
- **Prüfung:** Der Button „Prüfen“ in der Statusleiste validiert alle
|
- **Prüfung:** Der Button „Prüfen“ in der Statusleiste validiert alle
|
||||||
Elementsegmente gegen Katalog und Level-Regeln. Der Dialog listet Fehler
|
Elementsegmente gegen Katalog und Level-Regeln. Der Dialog nennt Saison,
|
||||||
und Warnungen mit Abschnitt und Element; ein leeres Ergebnis wird positiv
|
Quelle und Anzahl der geprüften Elemente und listet Fehler und Warnungen
|
||||||
bestätigt. Speichern und Export bleiben möglich.
|
mit Abschnitt und Element; ein leeres Ergebnis wird positiv bestätigt.
|
||||||
|
Speichern und Export bleiben möglich.
|
||||||
- **Section-Verwaltung:** Ein Panel rechts zeigt die chronologische
|
- **Section-Verwaltung:** Ein Panel rechts zeigt die chronologische
|
||||||
Abschnittsliste. Neue Sections werden angelegt, umbenannt, gelöscht und
|
Abschnittsliste. Neue Sections werden angelegt, umbenannt, gelöscht und
|
||||||
hoch-/runtergeschoben; `sequence_order` wird nach jeder Änderung
|
hoch-/runtergeschoben; `sequence_order` wird nach jeder Änderung
|
||||||
|
|
@ -353,7 +354,7 @@ Aktueller Stand:
|
||||||
Pflichtfeatures, Level-Abweichungen und programmweite Einmal-Features.
|
Pflichtfeatures, Level-Abweichungen und programmweite Einmal-Features.
|
||||||
- **Canvas:** 90 Assertions für Meter→Pixel-Mapping, Fit/Zoom/Pan,
|
- **Canvas:** 90 Assertions für Meter→Pixel-Mapping, Fit/Zoom/Pan,
|
||||||
Rink-Kontur und die reine Bogen-Geometrie.
|
Rink-Kontur und die reine Bogen-Geometrie.
|
||||||
- **Whiteboard:** 233 Assertions für Controller-Verdrahtung, Segmenterzeugung,
|
- **Whiteboard:** 237 Assertions für Controller-Verdrahtung, Segmenterzeugung,
|
||||||
Linien-/Bogenpfade, Klemmen an der Bande, Auswahl, Griff- und
|
Linien-/Bogenpfade, Klemmen an der Bande, Auswahl, Griff- und
|
||||||
Richtungs-/Kanten-Bearbeitung, Segmentlöschung, Element-Marker (Setzen,
|
Richtungs-/Kanten-Bearbeitung, Segmentlöschung, Element-Marker (Setzen,
|
||||||
Typwechsel, Inspector inkl. Standzeit, Base-Value- und Feature-Hinweis,
|
Typwechsel, Inspector inkl. Standzeit, Base-Value- und Feature-Hinweis,
|
||||||
|
|
|
||||||
|
|
@ -54,9 +54,11 @@ strukturierte Prüfung der Elementdaten gegen das geladene Regelwerk.
|
||||||
|
|
||||||
- Der Button **Prüfen** sitzt links neben „Segment löschen“ in der
|
- Der Button **Prüfen** sitzt links neben „Segment löschen“ in der
|
||||||
Statusleiste.
|
Statusleiste.
|
||||||
- Der Dialog `Kür prüfen` zeigt eine Zusammenfassung (`n Fehler, m Warnungen`)
|
- Der Dialog `Kür prüfen` nennt zuerst Katalog und Level-Regeln mit Saison und
|
||||||
und darunter die Befunde mit farbigem Punkt, Schweregrad, Abschnitt, Element
|
Quelle, damit klar ist, wogegen geprüft wurde.
|
||||||
und Meldung.
|
- Danach folgt eine Zusammenfassung (`n Fehler, m Warnungen · x Elemente
|
||||||
|
geprüft`) und darunter die Befunde mit farbigem Punkt, Schweregrad,
|
||||||
|
Abschnitt, Element und Meldung.
|
||||||
- Ein leeres Ergebnis wird positiv bestätigt: „Keine Befunde. Alle Elemente
|
- Ein leeres Ergebnis wird positiv bestätigt: „Keine Befunde. Alle Elemente
|
||||||
passen zu Katalog und Level-Regeln.“
|
passen zu Katalog und Level-Regeln.“
|
||||||
- Die Dialoggröße wird auf die Viewport-Größe begrenzt, damit sie auch in
|
- Die Dialoggröße wird auf die Viewport-Größe begrenzt, damit sie auch in
|
||||||
|
|
@ -87,8 +89,9 @@ Neu: `tests/run_validation_tests.gd` (28 Assertions)
|
||||||
- programmweites Einmal-Feature mit Verweis auf das erste Segment
|
- programmweites Einmal-Feature mit Verweis auf das erste Segment
|
||||||
- fehlendes Regelwerk
|
- fehlendes Regelwerk
|
||||||
|
|
||||||
Erweitert: `tests/run_whiteboard_tests.gd` (228 → 233 Assertions) prüft
|
Erweitert: `tests/run_whiteboard_tests.gd` (228 → 237 Assertions) prüft
|
||||||
`validate_routine()`, den Prüfdialog mit Fehlertext und eine saubere Kür.
|
`validate_routine()`, den Prüfdialog mit Fehlertext, die genannten Quellen
|
||||||
|
und eine saubere Kür.
|
||||||
|
|
||||||
Visuell geprüft über `tests/manual/capture_elements.gd ... validate` bei
|
Visuell geprüft über `tests/manual/capture_elements.gd ... validate` bei
|
||||||
1400 × 876.
|
1400 × 876.
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,9 @@ Abschnitt und Segment. Geprüft werden:
|
||||||
- Features, die laut Daten nur einmal pro Programm zählen
|
- Features, die laut Daten nur einmal pro Programm zählen
|
||||||
|
|
||||||
Der Button **Prüfen** in der Statusleiste öffnet die Befunde in einem Dialog.
|
Der Button **Prüfen** in der Statusleiste öffnet die Befunde in einem Dialog.
|
||||||
Die Prüfung blockiert Speichern und Export nicht. Noch nicht geprüft werden
|
Der Dialog nennt zuerst Katalog und Level-Regeln mit Saison und Quelle sowie
|
||||||
|
die Anzahl der geprüften Elemente. Die Prüfung blockiert Speichern und Export
|
||||||
|
nicht. Noch nicht geprüft werden
|
||||||
Programmtyp, erlaubte Elementanzahl, Wiederholungs- und Kombinationsregeln
|
Programmtyp, erlaubte Elementanzahl, Wiederholungs- und Kombinationsregeln
|
||||||
sowie die Begrenzung auf zwei Features pro Fuß.
|
sowie die Begrenzung auf zwei Features pro Fuß.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,10 @@ func _ready() -> void:
|
||||||
push_warning(
|
push_warning(
|
||||||
"Level rules: %s" % ", ".join(_level_rules.get_errors())
|
"Level rules: %s" % ", ".join(_level_rules.get_errors())
|
||||||
)
|
)
|
||||||
|
validation_button.tooltip_text = (
|
||||||
|
"Prüft gegen Katalog %s und Level-Regeln %s"
|
||||||
|
% [_element_catalog.season, _level_rules.season]
|
||||||
|
)
|
||||||
_setup_tool_options()
|
_setup_tool_options()
|
||||||
_setup_file_menu()
|
_setup_file_menu()
|
||||||
_setup_playback_controls()
|
_setup_playback_controls()
|
||||||
|
|
@ -451,17 +455,51 @@ func open_validation_dialog() -> void:
|
||||||
)
|
)
|
||||||
|
|
||||||
var lines := PackedStringArray()
|
var lines := PackedStringArray()
|
||||||
if issues.is_empty():
|
var element_count := _count_elements()
|
||||||
|
if _element_catalog != null:
|
||||||
lines.append(
|
lines.append(
|
||||||
"[b]Keine Befunde.[/b] Alle Elemente passen zu Katalog und Level-Regeln."
|
"[b]Katalog %s:[/b] %s"
|
||||||
|
% [
|
||||||
|
_element_catalog.season,
|
||||||
|
_escape_bbcode(_element_catalog.source),
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
if _level_rules != null:
|
||||||
|
lines.append(
|
||||||
|
"[b]Level-Regeln %s:[/b] %s"
|
||||||
|
% [
|
||||||
|
_level_rules.season,
|
||||||
|
_escape_bbcode(_level_rules.source),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
lines.append("")
|
||||||
|
|
||||||
|
if issues.is_empty():
|
||||||
|
if element_count == 0:
|
||||||
|
lines.append(
|
||||||
|
"[b]Keine Befunde.[/b] Es sind keine Elemente vorhanden."
|
||||||
|
)
|
||||||
|
elif element_count == 1:
|
||||||
|
lines.append(
|
||||||
|
"[b]Keine Befunde.[/b] Das Element passt zu Katalog und Level-Regeln."
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
lines.append(
|
||||||
|
"[b]Keine Befunde.[/b] Alle %d Elemente passen zu Katalog und Level-Regeln."
|
||||||
|
% element_count
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
lines.append(
|
lines.append(
|
||||||
"[b]%d Fehler, %d Warnungen[/b]" % [errors, warnings]
|
"[b]%d Fehler, %d Warnungen[/b] · %s geprüft"
|
||||||
|
% [errors, warnings, _element_count_label(element_count)]
|
||||||
)
|
)
|
||||||
lines.append("")
|
lines.append("")
|
||||||
for issue: ValidationIssue in issues:
|
for issue: ValidationIssue in issues:
|
||||||
var color := "#ef4444" if issue.severity == ValidationIssue.Severity.ERROR else "#f59e0b"
|
var color := (
|
||||||
|
"#ef4444"
|
||||||
|
if issue.severity == ValidationIssue.Severity.ERROR
|
||||||
|
else "#f59e0b"
|
||||||
|
)
|
||||||
lines.append(
|
lines.append(
|
||||||
"[color=%s]●[/color] [b]%s[/b]%s: %s"
|
"[color=%s]●[/color] [b]%s[/b]%s: %s"
|
||||||
% [
|
% [
|
||||||
|
|
@ -482,6 +520,23 @@ func open_validation_dialog() -> void:
|
||||||
validation_dialog.popup_centered(target)
|
validation_dialog.popup_centered(target)
|
||||||
|
|
||||||
|
|
||||||
|
func _count_elements() -> int:
|
||||||
|
if _routine == null:
|
||||||
|
return 0
|
||||||
|
var count := 0
|
||||||
|
for section: RoutineSection in _routine.sections:
|
||||||
|
if section == null:
|
||||||
|
continue
|
||||||
|
for segment: PathSegment in section.segments:
|
||||||
|
if segment != null and segment.is_element():
|
||||||
|
count += 1
|
||||||
|
return count
|
||||||
|
|
||||||
|
|
||||||
|
func _element_count_label(count: int) -> String:
|
||||||
|
return "1 Element" if count == 1 else "%d Elemente" % count
|
||||||
|
|
||||||
|
|
||||||
func _validation_location(issue: ValidationIssue) -> String:
|
func _validation_location(issue: ValidationIssue) -> String:
|
||||||
var parts := PackedStringArray()
|
var parts := PackedStringArray()
|
||||||
if not issue.section_id.is_empty():
|
if not issue.section_id.is_empty():
|
||||||
|
|
|
||||||
|
|
@ -1125,6 +1125,20 @@ func _run() -> void:
|
||||||
controller.validation_text.text.contains("nicht im Katalog"),
|
controller.validation_text.text.contains("nicht im Katalog"),
|
||||||
"validation dialog shows the catalog finding"
|
"validation dialog shows the catalog finding"
|
||||||
)
|
)
|
||||||
|
_check(
|
||||||
|
controller.validation_text.text.contains("Katalog 2025/26")
|
||||||
|
and controller.validation_text.text.contains("2707"),
|
||||||
|
"validation dialog names the catalog and its source"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
controller.validation_text.text.contains("Level-Regeln 2025/26")
|
||||||
|
and controller.validation_text.text.contains("2701"),
|
||||||
|
"validation dialog names the level rules and their source"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
controller.validation_text.text.contains("1 Element geprüft"),
|
||||||
|
"validation dialog reports how many elements were checked"
|
||||||
|
)
|
||||||
controller.validation_dialog.hide()
|
controller.validation_dialog.hide()
|
||||||
|
|
||||||
controller.new_routine()
|
controller.new_routine()
|
||||||
|
|
@ -1139,6 +1153,13 @@ func _run() -> void:
|
||||||
clean_issues.is_empty(),
|
clean_issues.is_empty(),
|
||||||
"a consistent routine has no validation findings"
|
"a consistent routine has no validation findings"
|
||||||
)
|
)
|
||||||
|
controller.open_validation_dialog()
|
||||||
|
_check(
|
||||||
|
controller.validation_text.text.contains("Keine Befunde")
|
||||||
|
and controller.validation_text.text.contains("Das Element passt"),
|
||||||
|
"clean validation names the rule set and the checked element count"
|
||||||
|
)
|
||||||
|
controller.validation_dialog.hide()
|
||||||
|
|
||||||
scene.queue_free()
|
scene.queue_free()
|
||||||
await process_frame
|
await process_frame
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue