feat: Legacy-Migration, Axel-Pflicht und Kombinations-Export
- Alte Freitext-Kombinationen werden beim Laden und Uebernehmen in die strukturierte Form migriert - Sprungfolgen verlangen einen Axel als 2. oder 3. Sprung - Dialoghinweis fuer Folgen (Axel vorhanden/fehlt) - Export zeigt eine Kombination als einen Marker mit voller Caption - 100 Model-, 169 Rules-, 66 Validation-, 70 Adult-, 297 Whiteboard- und 31 Export-Assertions (1075 gesamt) - Doku und Findings aktualisiert
This commit is contained in:
parent
8f1cf1bf44
commit
05dee8da2b
16 changed files with 422 additions and 32 deletions
|
|
@ -164,9 +164,11 @@ Datenquellen.
|
||||||
bis zu zwei weitere Sprünge, `jump_kind` unterscheidet Einzelsprung,
|
bis zu zwei weitere Sprünge, `jump_kind` unterscheidet Einzelsprung,
|
||||||
Kombination und Folge. Der Base Value wird aus den Teilen summiert, die
|
Kombination und Folge. Der Base Value wird aus den Teilen summiert, die
|
||||||
Wiederholungs- und Kombinationsprüfung arbeitet auf denselben Teilen. Alte
|
Wiederholungs- und Kombinationsprüfung arbeitet auf denselben Teilen. Alte
|
||||||
Freitext-Kürzel wie `3Lz+2T` werden weiterhin als Fallback geparst; neue
|
Freitext-Kürzel wie `3Lz+2T` werden beim Laden oder Übernehmen automatisch in
|
||||||
Elemente nutzen die strukturierte Auswahl im Element-Dialog. Der Export
|
die strukturierte Form überführt; nicht parsebare Sonderfälle bleiben als
|
||||||
verwendet die zusammengesetzte Caption (`3Lz+2T`, `3Lz+2A+SEQ`).
|
Text erhalten. Sprungfolgen verlangen einen Axel als zweiten oder dritten
|
||||||
|
Sprung. Der Export verwendet die zusammengesetzte Caption (`3Lz+2T`,
|
||||||
|
`3Lz+2A+SEQ`).
|
||||||
|
|
||||||
## 4. View- und Controller-Grenzen
|
## 4. View- und Controller-Grenzen
|
||||||
|
|
||||||
|
|
@ -385,7 +387,7 @@ Headless, ohne Editor und ohne Display:
|
||||||
|
|
||||||
Aktueller Stand:
|
Aktueller Stand:
|
||||||
|
|
||||||
- **Model:** 93 Assertions für Rink-Geometrie, Clamping, Segment-Timing,
|
- **Model:** 100 Assertions für Rink-Geometrie, Clamping, Segment-Timing,
|
||||||
Timing-Modi, Template-Metadaten, Element-Marker samt Kürzel-/Level-/Dauer-Grenzen,
|
Timing-Modi, Template-Metadaten, Element-Marker samt Kürzel-/Level-/Dauer-Grenzen,
|
||||||
Schema-Version, Section-Aggregation und Routine-Validierung.
|
Schema-Version, Section-Aggregation und Routine-Validierung.
|
||||||
- **Regelwerk:** 169 Assertions für Katalog-Metadaten, Saison/Quelle,
|
- **Regelwerk:** 169 Assertions für Katalog-Metadaten, Saison/Quelle,
|
||||||
|
|
@ -395,7 +397,7 @@ Aktueller Stand:
|
||||||
schwierige Variationen, Windmills, Level-4-Voraussetzungen, Pflichtfeatures
|
schwierige Variationen, Windmills, Level-4-Voraussetzungen, Pflichtfeatures
|
||||||
bei Schrittsequenzen, feste Level (`ChSq`, `ChSp`), Feature-Validierung und
|
bei Schrittsequenzen, feste Level (`ChSq`, `ChSp`), Feature-Validierung und
|
||||||
die Speicherung am Segment.
|
die Speicherung am Segment.
|
||||||
- **Validierung:** 63 Assertions für unbekannte Kürzel, Typ-Mismatches,
|
- **Validierung:** 66 Assertions für unbekannte Kürzel, Typ-Mismatches,
|
||||||
nicht verfügbare Level, Sprung-/ChSq-Sonderfälle, Feature-Fehler,
|
nicht verfügbare Level, Sprung-/ChSq-Sonderfälle, Feature-Fehler,
|
||||||
Pflichtfeatures, Level-Abweichungen, programmweite Einmal-Features, die
|
Pflichtfeatures, Level-Abweichungen, programmweite Einmal-Features, die
|
||||||
Prüfstatistik je Kategorie und die Basiswert-Summe.
|
Prüfstatistik je Kategorie und die Basiswert-Summe.
|
||||||
|
|
@ -404,7 +406,7 @@ Aktueller Stand:
|
||||||
- **Adult-Kategorien:** 70 Assertions für Metadaten, Gold/Silver/Bronze,
|
- **Adult-Kategorien:** 70 Assertions für Metadaten, Gold/Silver/Bronze,
|
||||||
Sprungerlaubnis, Level-Caps, Pflichtelemente, Wiederholungen, Kombinationen,
|
Sprungerlaubnis, Level-Caps, Pflichtelemente, Wiederholungen, Kombinationen,
|
||||||
Dauer und unbekannte Kategorien.
|
Dauer und unbekannte Kategorien.
|
||||||
- **Whiteboard:** 288 Assertions für Controller-Verdrahtung, Segmenterzeugung,
|
- **Whiteboard:** 297 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. Kürzelauswahl, Standzeit, Base-Value- und
|
Typwechsel, Inspector inkl. Kürzelauswahl, Standzeit, Base-Value- und
|
||||||
|
|
@ -423,9 +425,9 @@ Aktueller Stand:
|
||||||
Elementen und die Rotation des Markers in einer Pirouette.
|
Elementen und die Rotation des Markers in einer Pirouette.
|
||||||
- **Timing:** 41 Assertions für Dauer-/Tempo-Kopplung, Level-Presets,
|
- **Timing:** 41 Assertions für Dauer-/Tempo-Kopplung, Level-Presets,
|
||||||
Kalibrierung, Undo, Persistenz und Schema-1-Migration.
|
Kalibrierung, Undo, Persistenz und Schema-1-Migration.
|
||||||
- **Export:** 26 Assertions für SVG-Struktur, Titel-Escaping, Segment-Labels,
|
- **Export:** 31 Assertions für SVG-Struktur, Titel-Escaping, Segment-Labels,
|
||||||
Element-Marker, Section-Filter, Segmentfarben/-strichelung und das Schreiben
|
Element-Marker, strukturierte Sprungkombinationen, Section-Filter,
|
||||||
der Exportdatei.
|
Segmentfarben/-strichelung und das Schreiben der Exportdatei.
|
||||||
- **Touch/Tablet:** 28 Assertions für Ein-Finger-Zeichnen, Zwei-Finger-Pan,
|
- **Touch/Tablet:** 28 Assertions für Ein-Finger-Zeichnen, Zwei-Finger-Pan,
|
||||||
Pinch-Zoom, Tipp-Auswahl, Griff-Bearbeitung, Element-Marker per Tipp,
|
Pinch-Zoom, Tipp-Auswahl, Griff-Bearbeitung, Element-Marker per Tipp,
|
||||||
Abbruch bei zweitem Finger,
|
Abbruch bei zweitem Finger,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ und Bronze.
|
||||||
| Wiederholungen | max. 2-mal pro gelistetem Sprung, inkl. Kombinations-Teile |
|
| Wiederholungen | max. 2-mal pro gelistetem Sprung, inkl. Kombinations-Teile |
|
||||||
| Kombinationen | Anzahl, Folgen und max. Sprünge pro Kombination |
|
| Kombinationen | Anzahl, Folgen und max. Sprünge pro Kombination |
|
||||||
| Punktschätzung | Basiswert + PCS-Annahme + Sturzabzug |
|
| Punktschätzung | Basiswert + PCS-Annahme + Sturzabzug |
|
||||||
| Tests | 1051 Assertions gesamt, `./tools/test.sh` grün |
|
| Tests | 1075 Assertions gesamt, `./tools/test.sh` grün |
|
||||||
|
|
||||||
## Datenupdate 2026/27
|
## Datenupdate 2026/27
|
||||||
|
|
||||||
|
|
@ -150,10 +150,10 @@ Geschätzte Summe: 49,55
|
||||||
- **Adult:** 70 Assertions (Metadaten, Kategorien, Sprungerlaubnis,
|
- **Adult:** 70 Assertions (Metadaten, Kategorien, Sprungerlaubnis,
|
||||||
Gold-Limits, gültige Gold-Kür, Wiederholungen, Kombinationen, Dauer,
|
Gold-Limits, gültige Gold-Kür, Wiederholungen, Kombinationen, Dauer,
|
||||||
strukturierte Kombinationen und unbekannte Kategorie).
|
strukturierte Kombinationen und unbekannte Kategorie).
|
||||||
- **Whiteboard:** 288 Assertions (Kategorie-Auswahl, Prüfdialog, Gold-Befunde,
|
- **Whiteboard:** 297 Assertions (Kategorie-Auswahl, Prüfdialog, Gold-Befunde,
|
||||||
Punktschätzung, inline änderbare Annahmen, Hilfe-Dialog und strukturierte
|
Punktschätzung, inline änderbare Annahmen, Hilfe-Dialog, strukturierte
|
||||||
Sprungkombination).
|
Sprungkombinationen, Migration und Folge-Hinweis).
|
||||||
- **Gesamt:** 1051 Assertions.
|
- **Gesamt:** 1075 Assertions.
|
||||||
|
|
||||||
Visuell geprüft bei 1400 × 876 und 1024 × 768: Kategorie-Dropdown, Kopfzeile
|
Visuell geprüft bei 1400 × 876 und 1024 × 768: Kategorie-Dropdown, Kopfzeile
|
||||||
`Kategorie: Gold · 2:50 ±10 s`, Basiswert und Gold-Befunde.
|
`Kategorie: Gold · 2:50 ±10 s`, Basiswert und Gold-Befunde.
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,10 @@ geparst. Jetzt sind sie Teil des Modells und der Bedienung.
|
||||||
| Caption | `3Lz+2T`, Folge mit `+SEQ` |
|
| Caption | `3Lz+2T`, Folge mit `+SEQ` |
|
||||||
| Bedienung | Sprungkombination im Element-Dialog |
|
| Bedienung | Sprungkombination im Element-Dialog |
|
||||||
| Prüfung | Wiederholungen/Kombinationen auf strukturierten Teilen |
|
| Prüfung | Wiederholungen/Kombinationen auf strukturierten Teilen |
|
||||||
| Legacy | Freitext-Codes bleiben als Fallback lesbar |
|
| Legacy | Freitext-Codes werden beim Laden/Übernehmen migriert |
|
||||||
| Tests | 1051 Assertions gesamt, `./tools/test.sh` grün |
|
| Folge | Axel als 2./3. Sprung verpflichtend, Dialoghinweis |
|
||||||
|
| Export | Kombination erscheint als ein Marker mit voller Caption |
|
||||||
|
| Tests | 1075 Assertions gesamt, `./tools/test.sh` grün |
|
||||||
|
|
||||||
## Modell
|
## Modell
|
||||||
|
|
||||||
|
|
@ -67,17 +69,23 @@ Level-/Feature-Bereiche ausgeblendet.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
- **Model:** 93 Assertions (Kombination, Folge, Grenzen, Typwechsel).
|
- **Model:** 100 Assertions (Kombination, Folge, Grenzen, Typwechsel,
|
||||||
|
Legacy-Migration, Axel-Pflicht).
|
||||||
- **Regelwerk:** 169 Assertions (strukturierte und Legacy-Base-Values).
|
- **Regelwerk:** 169 Assertions (strukturierte und Legacy-Base-Values).
|
||||||
- **Adult:** 70 Assertions (strukturierte Wiederholungen/Kombinationen).
|
- **Adult:** 70 Assertions (strukturierte Wiederholungen/Kombinationen).
|
||||||
- **Whiteboard:** 288 Assertions (Dialog, Base-Value-Summe, Undo).
|
- **Whiteboard:** 297 Assertions (Dialog, Base-Value-Summe, Undo,
|
||||||
- **Gesamt:** 1051 Assertions.
|
Legacy-Migration, Folge-Hinweis).
|
||||||
|
- **Export:** 31 Assertions (Kombination als ein Marker inkl. Caption).
|
||||||
|
- **Gesamt:** 1075 Assertions.
|
||||||
|
|
||||||
Visuell geprüft bei 1400 × 876 und 1024 × 768 mit `3Lz+2T` und Base Value
|
Visuell geprüft bei 1400 × 876 und 1024 × 768 mit `3Lz+2T` und Base Value
|
||||||
7,20.
|
7,20.
|
||||||
|
|
||||||
## Offen
|
## Offen
|
||||||
|
|
||||||
- Migration alter Freitext-Kombinationen in die strukturierte Form
|
- Nicht parsebare Legacy-Sonderfälle bleiben Freitext und werden von der
|
||||||
- Strukturierte Sprungfolgen mit automatischer Axel-Prüfung
|
Validierung gemeldet.
|
||||||
- Kombinationen in Export und Timeline noch stärker als Einheit darstellen
|
- Die Axel-Prüfung bewertet den Code, nicht die tatsächliche Verbindung im
|
||||||
|
Laufweg.
|
||||||
|
- Die Timeline zeigt weiterhin einen Marker für das gesamte Element; eine
|
||||||
|
eigene Kombinationsdarstellung kann folgen.
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,7 @@ Abschnitt und Segment. Geprüft werden:
|
||||||
- unbekannte Features, zu häufige Features und fehlende Pflichtfeatures
|
- unbekannte Features, zu häufige Features und fehlende Pflichtfeatures
|
||||||
- Abweichungen zwischen Feature-Ergebnis und gewähltem Level
|
- Abweichungen zwischen Feature-Ergebnis und gewähltem Level
|
||||||
- Features, die laut Daten nur einmal pro Programm zählen
|
- Features, die laut Daten nur einmal pro Programm zählen
|
||||||
|
- Sprungfolgen ohne Axel als zweiten oder dritten Sprung
|
||||||
- bei gewählter Adult-Kategorie: Sprunganzahl, erlaubte Sprünge,
|
- bei gewählter Adult-Kategorie: Sprunganzahl, erlaubte Sprünge,
|
||||||
Pirouetten-/Sequenzanzahl, Level-Caps und Pflichtelemente
|
Pirouetten-/Sequenzanzahl, Level-Caps und Pflichtelemente
|
||||||
|
|
||||||
|
|
@ -284,6 +285,5 @@ mit ausgeliefert.
|
||||||
## Nächste Ausbaustufen
|
## Nächste Ausbaustufen
|
||||||
|
|
||||||
- Max. zwei Features pro Fuß und Feature-Positionsregeln
|
- Max. zwei Features pro Fuß und Feature-Positionsregeln
|
||||||
- Altdaten-Migration von Freitext-Kombinationen in die strukturierte Form
|
|
||||||
- GOE-Tabellen und `V`-/Unterrotations-Varianten
|
- GOE-Tabellen und `V`-/Unterrotations-Varianten
|
||||||
- Vorschlagsliste im Inspector direkt aus `suggest()`
|
- Vorschlagsliste im Inspector direkt aus `suggest()`
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,12 @@ Sprungkombinationen und -folgen sind strukturiert:
|
||||||
- **Kombination** – bis zu zwei weitere Sprünge, z. B. `3Lz+2T`
|
- **Kombination** – bis zu zwei weitere Sprünge, z. B. `3Lz+2T`
|
||||||
- **Folge (SEQ)** – bis zu zwei weitere Sprünge, Anzeige mit `+SEQ`
|
- **Folge (SEQ)** – bis zu zwei weitere Sprünge, Anzeige mit `+SEQ`
|
||||||
- Die Base Values der einzelnen Sprünge werden summiert.
|
- Die Base Values der einzelnen Sprünge werden summiert.
|
||||||
|
- Eine **Folge** braucht einen Axel (1A/2A/3A) als zweiten oder dritten
|
||||||
|
Sprung; der Dialog zeigt einen entsprechenden Hinweis.
|
||||||
- Wiederholungen und Kombinationsgrenzen werden anhand der strukturierten
|
- Wiederholungen und Kombinationsgrenzen werden anhand der strukturierten
|
||||||
Teile geprüft, nicht mehr aus dem Kürzeltext geraten.
|
Teile geprüft, nicht mehr aus dem Kürzeltext geraten.
|
||||||
- Alte Freitext-Kürzel wie `3Lz+2T` werden weiterhin als Fallback gelesen und
|
- Alte Freitext-Kürzel wie `3Lz+2T` werden weiterhin als Fallback gelesen und
|
||||||
für Prüfung und Base Value geparst. Neu angelegte Elemente sollten die
|
beim Laden oder Übernehmen automatisch in die strukturierte Form überführt.
|
||||||
strukturierte Auswahl verwenden.
|
|
||||||
|
|
||||||
## Level aus Features
|
## Level aus Features
|
||||||
|
|
||||||
|
|
@ -156,8 +157,8 @@ Durchschnitt sollte zum aktuellen Leistungsstand passen, nicht zum Wunschziel.
|
||||||
## Grenzen
|
## Grenzen
|
||||||
|
|
||||||
- Features und PCS sind Eingaben, keine Messungen aus der Zeichnung.
|
- Features und PCS sind Eingaben, keine Messungen aus der Zeichnung.
|
||||||
- Alte Freitext-Kombinationen werden noch geparst; neue Elemente nutzen die
|
- Alte Freitext-Kombinationen werden beim Laden/Übernehmen migriert; nicht
|
||||||
strukturierte Auswahl im Element-Dialog.
|
parsebare Sonderfälle bleiben als Text erhalten.
|
||||||
- Max. zwei Features pro Fuß und Feature-Positionsregeln sind offen.
|
- Max. zwei Features pro Fuß und Feature-Positionsregeln sind offen.
|
||||||
- Adult-spezifische Sonderfälle außerhalb des Announcements 2026/27 sind
|
- Adult-spezifische Sonderfälle außerhalb des Announcements 2026/27 sind
|
||||||
nicht abgebildet.
|
nicht abgebildet.
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,8 @@ Voraussetzung für Phase 1.
|
||||||
- [x] Wiederholungsregeln (max. 2-mal pro gelistetem Sprung)
|
- [x] Wiederholungsregeln (max. 2-mal pro gelistetem Sprung)
|
||||||
- [x] Kombinationsgrenzen (Anzahl, Folgen, max. Sprünge pro Kombination)
|
- [x] Kombinationsgrenzen (Anzahl, Folgen, max. Sprünge pro Kombination)
|
||||||
- [x] Strukturierte Sprungkombinationen/-folgen (erster Sprung + bis zu zwei weitere)
|
- [x] Strukturierte Sprungkombinationen/-folgen (erster Sprung + bis zu zwei weitere)
|
||||||
- [ ] Altdaten-Migration von Freitext-Kombinationen in die strukturierte Form
|
- [x] Altdaten-Migration von Freitext-Kombinationen in die strukturierte Form
|
||||||
|
- [x] Axel-Pflicht für Sprungfolgen (Modell, Validator und Dialoghinweis)
|
||||||
- [x] Dauerprüfung gegen die Kategorie-Zeit
|
- [x] Dauerprüfung gegen die Kategorie-Zeit
|
||||||
- [x] PCS und Sturzabzüge in der Punktschätzung (mit Annahmen)
|
- [x] PCS und Sturzabzüge in der Punktschätzung (mit Annahmen)
|
||||||
- [x] In-App-Hilfe „Hilfe & Annahmen“ und `docs/manual.md`
|
- [x] In-App-Hilfe „Hilfe & Annahmen“ und `docs/manual.md`
|
||||||
|
|
|
||||||
|
|
@ -684,6 +684,15 @@ custom_minimum_size = Vector2(0, 48)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_font_sizes/font_size = 16
|
theme_override_font_sizes/font_size = 16
|
||||||
|
|
||||||
|
[node name="JumpSequenceHint" type="Label" parent="ElementDialog/ElementBox/JumpCombinationBox"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
custom_minimum_size = Vector2(480, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_colors/font_color = Color(0.74902, 0.803922, 0.878431, 1)
|
||||||
|
theme_override_font_sizes/font_size = 13
|
||||||
|
autowrap_mode = 3
|
||||||
|
|
||||||
[node name="ElementFeaturesButton" type="Button" parent="ElementDialog/ElementBox"]
|
[node name="ElementFeaturesButton" type="Button" parent="ElementDialog/ElementBox"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(0, 56)
|
custom_minimum_size = Vector2(0, 56)
|
||||||
|
|
|
||||||
|
|
@ -231,6 +231,77 @@ func get_jump_parts() -> PackedStringArray:
|
||||||
return parts
|
return parts
|
||||||
|
|
||||||
|
|
||||||
|
## Parses a legacy free-text jump combination like "3Lz+2T+SEQ" without
|
||||||
|
## mutating the segment. Returns valid=false when the code is not a clean
|
||||||
|
## combination of listed jumps.
|
||||||
|
static func parse_legacy_combination(code: String) -> Dictionary:
|
||||||
|
var result := {
|
||||||
|
"valid": false,
|
||||||
|
"first": "",
|
||||||
|
"extras": PackedStringArray(),
|
||||||
|
"kind": JumpKind.SOLO,
|
||||||
|
}
|
||||||
|
var cleaned := code.strip_edges()
|
||||||
|
if not cleaned.contains("+"):
|
||||||
|
return result
|
||||||
|
|
||||||
|
var listed := PackedStringArray()
|
||||||
|
var has_sequence := false
|
||||||
|
for raw: String in cleaned.split("+"):
|
||||||
|
var token := raw.strip_edges()
|
||||||
|
var upper := token.to_upper()
|
||||||
|
if token.is_empty():
|
||||||
|
continue
|
||||||
|
if upper == "SEQ" or upper == "S":
|
||||||
|
has_sequence = true
|
||||||
|
continue
|
||||||
|
if token.length() < 2 or not token.substr(0, 1).is_valid_int():
|
||||||
|
continue
|
||||||
|
if token.substr(1).to_lower() == "eu":
|
||||||
|
continue
|
||||||
|
listed.append(token)
|
||||||
|
|
||||||
|
if listed.size() < 2 or listed.size() > JUMP_MAX_PARTS:
|
||||||
|
return result
|
||||||
|
|
||||||
|
var extras := PackedStringArray()
|
||||||
|
for index: int in range(1, listed.size()):
|
||||||
|
extras.append(listed[index])
|
||||||
|
result["valid"] = true
|
||||||
|
result["first"] = listed[0]
|
||||||
|
result["extras"] = extras
|
||||||
|
result["kind"] = (
|
||||||
|
JumpKind.SEQUENCE if has_sequence else JumpKind.COMBINATION
|
||||||
|
)
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
## Converts a stored legacy free-text combination into the structured fields.
|
||||||
|
## Returns true when the segment changed.
|
||||||
|
func normalize_jump_combination() -> bool:
|
||||||
|
if (
|
||||||
|
element_type != ElementType.JUMP
|
||||||
|
or not combination_jumps.is_empty()
|
||||||
|
or not element_code.contains("+")
|
||||||
|
):
|
||||||
|
return false
|
||||||
|
var parsed := parse_legacy_combination(element_code)
|
||||||
|
if not bool(parsed.get("valid", false)):
|
||||||
|
return false
|
||||||
|
element_code = str(parsed.get("first", ""))
|
||||||
|
jump_kind = parsed.get("kind", JumpKind.SOLO)
|
||||||
|
combination_jumps = parsed.get("extras", PackedStringArray())
|
||||||
|
return true
|
||||||
|
|
||||||
|
|
||||||
|
static func is_axel(code: String) -> bool:
|
||||||
|
var cleaned := code.strip_edges()
|
||||||
|
return (
|
||||||
|
cleaned.length() >= 2
|
||||||
|
and cleaned.substr(1).to_lower() == "a"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
## Short caption for the canvas and exports, e.g. "3Lz" or "CCoSp4 L3".
|
## Short caption for the canvas and exports, e.g. "3Lz" or "CCoSp4 L3".
|
||||||
func get_element_caption() -> String:
|
func get_element_caption() -> String:
|
||||||
var code := element_code.strip_edges()
|
var code := element_code.strip_edges()
|
||||||
|
|
@ -327,6 +398,16 @@ func validate() -> PackedStringArray:
|
||||||
errors.append(
|
errors.append(
|
||||||
"a jump combination must not exceed %d jumps" % JUMP_MAX_PARTS
|
"a jump combination must not exceed %d jumps" % JUMP_MAX_PARTS
|
||||||
)
|
)
|
||||||
|
if jump_kind == JumpKind.SEQUENCE:
|
||||||
|
var has_axel := false
|
||||||
|
for extra: String in combination_jumps:
|
||||||
|
if is_axel(extra):
|
||||||
|
has_axel = true
|
||||||
|
break
|
||||||
|
if not has_axel:
|
||||||
|
errors.append(
|
||||||
|
"a jump sequence needs an Axel-type second or third jump"
|
||||||
|
)
|
||||||
if (
|
if (
|
||||||
element_duration_seconds < 0.0
|
element_duration_seconds < 0.0
|
||||||
or element_duration_seconds > ELEMENT_MAX_DURATION_SECONDS
|
or element_duration_seconds > ELEMENT_MAX_DURATION_SECONDS
|
||||||
|
|
|
||||||
|
|
@ -526,6 +526,7 @@ func _validate_segment(
|
||||||
_pass(report, "level")
|
_pass(report, "level")
|
||||||
|
|
||||||
_validate_features(segment, code, section_id, report)
|
_validate_features(segment, code, section_id, report)
|
||||||
|
_validate_jump_sequence(segment, section_id, report)
|
||||||
|
|
||||||
|
|
||||||
func _validate_features(
|
func _validate_features(
|
||||||
|
|
@ -654,6 +655,40 @@ func _validate_features(
|
||||||
_fail(report, "level_features", false)
|
_fail(report, "level_features", false)
|
||||||
|
|
||||||
|
|
||||||
|
func _validate_jump_sequence(
|
||||||
|
segment: PathSegment,
|
||||||
|
section_id: String,
|
||||||
|
report: ValidationReport
|
||||||
|
) -> void:
|
||||||
|
if (
|
||||||
|
segment.element_type != PathSegment.ElementType.JUMP
|
||||||
|
or segment.jump_kind != PathSegment.JumpKind.SEQUENCE
|
||||||
|
):
|
||||||
|
return
|
||||||
|
var parts := _segment_jump_parts(segment)
|
||||||
|
if parts.size() < 2:
|
||||||
|
return
|
||||||
|
var has_axel := false
|
||||||
|
for index: int in range(1, parts.size()):
|
||||||
|
if AdultCategoryRules.Category.jump_type(
|
||||||
|
parts[index]
|
||||||
|
).to_lower() == "a":
|
||||||
|
has_axel = true
|
||||||
|
break
|
||||||
|
if has_axel:
|
||||||
|
_pass(report, "jump_sequence")
|
||||||
|
return
|
||||||
|
_append(
|
||||||
|
report,
|
||||||
|
ValidationIssue.Severity.WARNING,
|
||||||
|
"Folge „%s“ braucht einen Axel als 2. oder 3. Sprung."
|
||||||
|
% segment.get_element_caption(),
|
||||||
|
section_id,
|
||||||
|
segment.segment_id
|
||||||
|
)
|
||||||
|
_fail(report, "jump_sequence", false)
|
||||||
|
|
||||||
|
|
||||||
## Features marked as once-per-program may only count in the first element
|
## Features marked as once-per-program may only count in the first element
|
||||||
## that uses them. The technical rule additionally depends on categories and
|
## that uses them. The technical rule additionally depends on categories and
|
||||||
## positions; the data flag is the simplified part that can be checked today.
|
## positions; the data flag is the simplified part that can be checked today.
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ const CHECK_ORDER := [
|
||||||
"required",
|
"required",
|
||||||
"level_features",
|
"level_features",
|
||||||
"once",
|
"once",
|
||||||
|
"jump_sequence",
|
||||||
"category",
|
"category",
|
||||||
"category_jumps",
|
"category_jumps",
|
||||||
"category_jump_types",
|
"category_jump_types",
|
||||||
|
|
@ -34,6 +35,7 @@ const CHECK_LABELS := {
|
||||||
"required": "Pflichtfeatures",
|
"required": "Pflichtfeatures",
|
||||||
"level_features": "Level aus Features",
|
"level_features": "Level aus Features",
|
||||||
"once": "Einmal pro Programm",
|
"once": "Einmal pro Programm",
|
||||||
|
"jump_sequence": "Sprungfolge",
|
||||||
"category": "Kategorie",
|
"category": "Kategorie",
|
||||||
"category_jumps": "Kategorie: Sprunganzahl",
|
"category_jumps": "Kategorie: Sprunganzahl",
|
||||||
"category_jump_types": "Kategorie: erlaubte Sprünge",
|
"category_jump_types": "Kategorie: erlaubte Sprünge",
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ const COMPACT_LAYOUT_WIDTH := 1280.0
|
||||||
@onready var jump_kind_option: OptionButton = %JumpKindOption
|
@onready var jump_kind_option: OptionButton = %JumpKindOption
|
||||||
@onready var jump_second_option: OptionButton = %JumpSecondOption
|
@onready var jump_second_option: OptionButton = %JumpSecondOption
|
||||||
@onready var jump_third_option: OptionButton = %JumpThirdOption
|
@onready var jump_third_option: OptionButton = %JumpThirdOption
|
||||||
|
@onready var jump_sequence_hint: Label = %JumpSequenceHint
|
||||||
@onready var element_features_button: Button = %ElementFeaturesButton
|
@onready var element_features_button: Button = %ElementFeaturesButton
|
||||||
@onready var element_feature_hint: Label = %ElementFeatureHint
|
@onready var element_feature_hint: Label = %ElementFeatureHint
|
||||||
@onready var element_feature_menu: PopupMenu = %ElementFeatureMenu
|
@onready var element_feature_menu: PopupMenu = %ElementFeatureMenu
|
||||||
|
|
@ -721,6 +722,8 @@ func _validation_skip_reason(check_code: String) -> String:
|
||||||
return "keine Features gesetzt"
|
return "keine Features gesetzt"
|
||||||
"once":
|
"once":
|
||||||
return "keine Einmal-Features gesetzt"
|
return "keine Einmal-Features gesetzt"
|
||||||
|
"jump_sequence":
|
||||||
|
return "keine Sprungfolge"
|
||||||
return "keine passenden Daten"
|
return "keine passenden Daten"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -819,7 +822,11 @@ func _help_content() -> String:
|
||||||
+ "werden summiert."
|
+ "werden summiert."
|
||||||
)
|
)
|
||||||
lines.append(
|
lines.append(
|
||||||
"- Alte Freitext-Kombinationen wie 3Lz+2T bleiben als Fallback lesbar."
|
"- Eine Folge braucht einen Axel (1A/2A/3A) als 2. oder 3. Sprung."
|
||||||
|
)
|
||||||
|
lines.append(
|
||||||
|
"- Alte Freitext-Kombinationen werden beim Laden oder Übernehmen "
|
||||||
|
+ "automatisch in die strukturierte Form überführt."
|
||||||
)
|
)
|
||||||
lines.append(
|
lines.append(
|
||||||
"- ChSq (Choreo-Sequenz) und ChSp (Choreographic Spin) sind fest "
|
"- ChSq (Choreo-Sequenz) und ChSp (Choreographic Spin) sind fest "
|
||||||
|
|
@ -1472,6 +1479,7 @@ func _on_jump_extra_selected(_index: int) -> void:
|
||||||
if not code.is_empty():
|
if not code.is_empty():
|
||||||
extras.append(code)
|
extras.append(code)
|
||||||
_dialog_combination_jumps = extras
|
_dialog_combination_jumps = extras
|
||||||
|
_update_jump_controls()
|
||||||
update_element_value_hint()
|
update_element_value_hint()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1489,6 +1497,25 @@ func _update_jump_controls() -> void:
|
||||||
)
|
)
|
||||||
jump_second_option.visible = show_extras
|
jump_second_option.visible = show_extras
|
||||||
jump_third_option.visible = show_extras
|
jump_third_option.visible = show_extras
|
||||||
|
var is_sequence := (
|
||||||
|
is_jump and _dialog_jump_kind == PathSegment.JumpKind.SEQUENCE
|
||||||
|
)
|
||||||
|
jump_sequence_hint.visible = is_sequence
|
||||||
|
if is_sequence:
|
||||||
|
var has_axel := false
|
||||||
|
for extra: String in _dialog_combination_jumps:
|
||||||
|
if PathSegment.is_axel(extra):
|
||||||
|
has_axel = true
|
||||||
|
break
|
||||||
|
jump_sequence_hint.text = (
|
||||||
|
"Folge: Axel vorhanden."
|
||||||
|
if has_axel
|
||||||
|
else "Folge: mindestens ein Axel (1A/2A/3A) als 2. oder 3. Sprung."
|
||||||
|
)
|
||||||
|
jump_sequence_hint.add_theme_color_override(
|
||||||
|
"font_color",
|
||||||
|
Color("#22c55e") if has_axel else Color("#f59e0b")
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func _select_jump_extra(option: OptionButton, code: String) -> void:
|
func _select_jump_extra(option: OptionButton, code: String) -> void:
|
||||||
|
|
@ -1627,6 +1654,22 @@ func set_selected_element_with_features(
|
||||||
clamped = int(normalized["level"])
|
clamped = int(normalized["level"])
|
||||||
if _is_derived_level(type, cleaned):
|
if _is_derived_level(type, cleaned):
|
||||||
clamped = _derived_level(type, cleaned, cleaned_features)
|
clamped = _derived_level(type, cleaned, cleaned_features)
|
||||||
|
if (
|
||||||
|
type == PathSegment.ElementType.JUMP
|
||||||
|
and cleaned_combination.is_empty()
|
||||||
|
and cleaned.contains("+")
|
||||||
|
):
|
||||||
|
var parsed := PathSegment.parse_legacy_combination(cleaned)
|
||||||
|
if bool(parsed.get("valid", false)):
|
||||||
|
cleaned = str(parsed.get("first", cleaned))
|
||||||
|
cleaned_kind = parsed.get(
|
||||||
|
"kind",
|
||||||
|
PathSegment.JumpKind.SOLO
|
||||||
|
)
|
||||||
|
cleaned_combination = parsed.get(
|
||||||
|
"extras",
|
||||||
|
PackedStringArray()
|
||||||
|
)
|
||||||
var clamped_duration := -1.0
|
var clamped_duration := -1.0
|
||||||
if type == PathSegment.ElementType.NONE:
|
if type == PathSegment.ElementType.NONE:
|
||||||
cleaned = ""
|
cleaned = ""
|
||||||
|
|
@ -1706,6 +1749,7 @@ func add_element_marker(
|
||||||
str(normalized["code"]),
|
str(normalized["code"]),
|
||||||
int(normalized["level"])
|
int(normalized["level"])
|
||||||
)
|
)
|
||||||
|
segment.normalize_jump_combination()
|
||||||
if _is_derived_level(type, segment.element_code):
|
if _is_derived_level(type, segment.element_code):
|
||||||
segment.element_level = _derived_level(
|
segment.element_level = _derived_level(
|
||||||
type,
|
type,
|
||||||
|
|
@ -3210,6 +3254,12 @@ func _install_routine(
|
||||||
_routine = routine
|
_routine = routine
|
||||||
if _routine.rink == null or not _routine.rink.is_valid():
|
if _routine.rink == null or not _routine.rink.is_valid():
|
||||||
_routine.rink = RinkDimensions.new()
|
_routine.rink = RinkDimensions.new()
|
||||||
|
for section: RoutineSection in _routine.sections:
|
||||||
|
if section == null:
|
||||||
|
continue
|
||||||
|
for segment: PathSegment in section.segments:
|
||||||
|
if segment != null:
|
||||||
|
segment.normalize_jump_combination()
|
||||||
_sync_adult_category_option()
|
_sync_adult_category_option()
|
||||||
|
|
||||||
var valid_sections: Array[RoutineSection] = []
|
var valid_sections: Array[RoutineSection] = []
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,22 @@ func _capture() -> void:
|
||||||
controller.jump_second_option.select(index)
|
controller.jump_second_option.select(index)
|
||||||
controller.jump_second_option.item_selected.emit(index)
|
controller.jump_second_option.item_selected.emit(index)
|
||||||
break
|
break
|
||||||
|
elif args.size() > 3 and args[3] == "seqwarn":
|
||||||
|
controller.select_segment(jump.segment_id)
|
||||||
|
controller.element_button.pressed.emit()
|
||||||
|
var sequence_kind := controller.jump_kind_option.get_item_index(
|
||||||
|
PathSegment.JumpKind.SEQUENCE
|
||||||
|
)
|
||||||
|
controller.jump_kind_option.select(sequence_kind)
|
||||||
|
controller.jump_kind_option.item_selected.emit(sequence_kind)
|
||||||
|
for index: int in range(controller.jump_second_option.item_count):
|
||||||
|
var metadata: Variant = controller.jump_second_option.get_item_metadata(
|
||||||
|
index
|
||||||
|
)
|
||||||
|
if metadata != null and str(metadata) == "2T":
|
||||||
|
controller.jump_second_option.select(index)
|
||||||
|
controller.jump_second_option.item_selected.emit(index)
|
||||||
|
break
|
||||||
elif args.size() > 3 and args[3] == "adultgold":
|
elif args.size() > 3 and args[3] == "adultgold":
|
||||||
controller.set_adult_category("gold")
|
controller.set_adult_category("gold")
|
||||||
controller.open_validation_dialog()
|
controller.open_validation_dialog()
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,21 @@ func _run() -> void:
|
||||||
"SVG labels get a white outline"
|
"SVG labels get a white outline"
|
||||||
)
|
)
|
||||||
_check(
|
_check(
|
||||||
_count(svg, 'class="element-marker"') == 2,
|
_count(svg, 'class="element-marker"') == 3,
|
||||||
"SVG contains both element markers"
|
"SVG contains all element markers"
|
||||||
)
|
)
|
||||||
_check(
|
_check(
|
||||||
svg.contains('data-element="3Lz"'),
|
svg.contains('data-element="3Lz"'),
|
||||||
"SVG names the jump marker"
|
"SVG names the jump marker"
|
||||||
)
|
)
|
||||||
|
_check(
|
||||||
|
svg.contains('data-element="2T+2S"'),
|
||||||
|
"SVG treats a combination as one marker"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
svg.contains(">2T+2S</text>"),
|
||||||
|
"SVG draws the combination caption"
|
||||||
|
)
|
||||||
_check(
|
_check(
|
||||||
svg.contains('data-element="CCoSp4 L3"'),
|
svg.contains('data-element="CCoSp4 L3"'),
|
||||||
"SVG names the spin marker with its level"
|
"SVG names the spin marker with its level"
|
||||||
|
|
@ -80,6 +88,20 @@ func _run() -> void:
|
||||||
"section export excludes markers of other sections"
|
"section export excludes markers of other sections"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var section_two_svg := RoutineSvgExporter.build(routine, "section-2")
|
||||||
|
_check(
|
||||||
|
_count(section_two_svg, 'class="element-marker"') == 2,
|
||||||
|
"the second section exports jump and combination"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
section_two_svg.contains('data-element="2T+2S"'),
|
||||||
|
"the second section exports the combination as one marker"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
not section_two_svg.contains('data-element="CCoSp4 L3"'),
|
||||||
|
"the second section excludes the spin of section one"
|
||||||
|
)
|
||||||
|
|
||||||
var scene := WhiteboardScene.instantiate()
|
var scene := WhiteboardScene.instantiate()
|
||||||
var controller := scene as WhiteboardController
|
var controller := scene as WhiteboardController
|
||||||
if controller != null:
|
if controller != null:
|
||||||
|
|
@ -176,7 +198,18 @@ func _make_routine() -> Routine:
|
||||||
"3Lz",
|
"3Lz",
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
section_two.segments = [arc, jump_marker]
|
var combo_marker := _make_marker(
|
||||||
|
"seg-marker-combo",
|
||||||
|
Vector2(18.0, 5.0),
|
||||||
|
PathSegment.ElementType.JUMP,
|
||||||
|
"2T",
|
||||||
|
0
|
||||||
|
)
|
||||||
|
combo_marker.set_jump_combination(
|
||||||
|
PathSegment.JumpKind.COMBINATION,
|
||||||
|
PackedStringArray(["2S"])
|
||||||
|
)
|
||||||
|
section_two.segments = [arc, jump_marker, combo_marker]
|
||||||
|
|
||||||
routine.sections = [section_one, section_two]
|
routine.sections = [section_one, section_two]
|
||||||
return routine
|
return routine
|
||||||
|
|
|
||||||
|
|
@ -361,6 +361,69 @@ func _test_jump_combinations() -> void:
|
||||||
"an empty combination is rejected"
|
"an empty combination is rejected"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var legacy_combo: PathSegment = PathSegmentModel.new()
|
||||||
|
legacy_combo.segment_id = "legacy-combo"
|
||||||
|
legacy_combo.curve = curve
|
||||||
|
legacy_combo.set_element(
|
||||||
|
PathSegmentModel.ElementType.JUMP,
|
||||||
|
"3Lz+2T",
|
||||||
|
0
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
legacy_combo.normalize_jump_combination(),
|
||||||
|
"legacy combination is migrated"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
legacy_combo.element_code == "3Lz"
|
||||||
|
and legacy_combo.jump_kind == PathSegmentModel.JumpKind.COMBINATION
|
||||||
|
and legacy_combo.combination_jumps == PackedStringArray(["2T"]),
|
||||||
|
"legacy combination parts are structured"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
legacy_combo.get_element_caption() == "3Lz+2T",
|
||||||
|
"legacy combination keeps its caption"
|
||||||
|
)
|
||||||
|
|
||||||
|
var legacy_sequence: PathSegment = PathSegmentModel.new()
|
||||||
|
legacy_sequence.segment_id = "legacy-sequence"
|
||||||
|
legacy_sequence.curve = curve
|
||||||
|
legacy_sequence.set_element(
|
||||||
|
PathSegmentModel.ElementType.JUMP,
|
||||||
|
"3S+2A+SEQ",
|
||||||
|
0
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
legacy_sequence.normalize_jump_combination(),
|
||||||
|
"legacy sequence is migrated"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
legacy_sequence.jump_kind == PathSegmentModel.JumpKind.SEQUENCE
|
||||||
|
and legacy_sequence.combination_jumps == PackedStringArray(["2A"]),
|
||||||
|
"legacy sequence parts are structured"
|
||||||
|
)
|
||||||
|
_check(legacy_sequence.is_valid(), "legacy sequence with Axel is valid")
|
||||||
|
|
||||||
|
var sequence_without_axel: PathSegment = PathSegmentModel.new()
|
||||||
|
sequence_without_axel.segment_id = "sequence-no-axel"
|
||||||
|
sequence_without_axel.curve = curve
|
||||||
|
sequence_without_axel.set_element(
|
||||||
|
PathSegmentModel.ElementType.JUMP,
|
||||||
|
"3S",
|
||||||
|
0
|
||||||
|
)
|
||||||
|
sequence_without_axel.set_jump_combination(
|
||||||
|
PathSegmentModel.JumpKind.SEQUENCE,
|
||||||
|
PackedStringArray(["2T"])
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
not sequence_without_axel.is_valid()
|
||||||
|
and _contains_error(
|
||||||
|
sequence_without_axel.validate(),
|
||||||
|
"Axel-type second or third jump"
|
||||||
|
),
|
||||||
|
"a sequence without an Axel is rejected"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func _test_section_aggregation() -> void:
|
func _test_section_aggregation() -> void:
|
||||||
var section: RoutineSection = RoutineSectionModel.new()
|
var section: RoutineSection = RoutineSectionModel.new()
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ func _init() -> void:
|
||||||
_test_missing_code()
|
_test_missing_code()
|
||||||
_test_feature_selection()
|
_test_feature_selection()
|
||||||
_test_level_mismatch()
|
_test_level_mismatch()
|
||||||
|
_test_jump_sequence()
|
||||||
_test_program_once_features()
|
_test_program_once_features()
|
||||||
_test_missing_rules()
|
_test_missing_rules()
|
||||||
_finish()
|
_finish()
|
||||||
|
|
@ -324,6 +325,38 @@ func _test_level_mismatch() -> void:
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
func _test_jump_sequence() -> void:
|
||||||
|
var routine := _make_routine()
|
||||||
|
var segment := _add_marker(
|
||||||
|
routine.sections[0],
|
||||||
|
"sequence",
|
||||||
|
PathSegment.ElementType.JUMP,
|
||||||
|
"3S",
|
||||||
|
0,
|
||||||
|
PackedStringArray()
|
||||||
|
)
|
||||||
|
segment.set_jump_combination(
|
||||||
|
PathSegment.JumpKind.SEQUENCE,
|
||||||
|
PackedStringArray(["2T"])
|
||||||
|
)
|
||||||
|
var report := _validator.validate_report(routine)
|
||||||
|
_check(
|
||||||
|
report.get_check("jump_sequence").warnings == 1,
|
||||||
|
"a sequence without an Axel is reported"
|
||||||
|
)
|
||||||
|
_check(_has_message(report.issues, "Axel als 2. oder 3. Sprung"), "Axel message")
|
||||||
|
|
||||||
|
segment.set_jump_combination(
|
||||||
|
PathSegment.JumpKind.SEQUENCE,
|
||||||
|
PackedStringArray(["2A"])
|
||||||
|
)
|
||||||
|
report = _validator.validate_report(routine)
|
||||||
|
_check(
|
||||||
|
report.get_check("jump_sequence").passed == 1,
|
||||||
|
"a sequence with an Axel passes"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func _test_program_once_features() -> void:
|
func _test_program_once_features() -> void:
|
||||||
var routine := _make_routine()
|
var routine := _make_routine()
|
||||||
var section := routine.sections[0]
|
var section := routine.sections[0]
|
||||||
|
|
|
||||||
|
|
@ -1447,6 +1447,62 @@ func _run() -> void:
|
||||||
"undo restores the solo jump"
|
"undo restores the solo jump"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var legacy_marker := controller.add_element_marker(
|
||||||
|
Vector2(0.0, 0.0),
|
||||||
|
PathSegment.ElementType.JUMP,
|
||||||
|
"3Lz+2T",
|
||||||
|
0
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
legacy_marker.element_code == "3Lz"
|
||||||
|
and legacy_marker.jump_kind == PathSegment.JumpKind.COMBINATION
|
||||||
|
and legacy_marker.combination_jumps == PackedStringArray(["2T"]),
|
||||||
|
"legacy free-text combinations are migrated on insert"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
legacy_marker.get_element_caption() == "3Lz+2T",
|
||||||
|
"the migrated legacy marker keeps its caption"
|
||||||
|
)
|
||||||
|
|
||||||
|
controller.select_segment(combo_marker.segment_id)
|
||||||
|
controller.element_button.pressed.emit()
|
||||||
|
var sequence_kind_index := controller.jump_kind_option.get_item_index(
|
||||||
|
PathSegment.JumpKind.SEQUENCE
|
||||||
|
)
|
||||||
|
controller.jump_kind_option.select(sequence_kind_index)
|
||||||
|
controller.jump_kind_option.item_selected.emit(sequence_kind_index)
|
||||||
|
_check(
|
||||||
|
controller.jump_sequence_hint.visible
|
||||||
|
and controller.jump_sequence_hint.text.contains("mindestens ein Axel"),
|
||||||
|
"the sequence hint asks for an Axel"
|
||||||
|
)
|
||||||
|
_select_option_by_metadata(controller.jump_second_option, "2T")
|
||||||
|
_check(
|
||||||
|
controller.jump_sequence_hint.text.contains("mindestens ein Axel"),
|
||||||
|
"a sequence without an Axel keeps the warning"
|
||||||
|
)
|
||||||
|
_select_option_by_metadata(controller.jump_second_option, "2A")
|
||||||
|
_check(
|
||||||
|
controller.jump_sequence_hint.text.contains("Axel vorhanden"),
|
||||||
|
"selecting an Axel satisfies the sequence hint"
|
||||||
|
)
|
||||||
|
_check(
|
||||||
|
controller.element_value_label.text.contains("4,60"),
|
||||||
|
"the sequence base value sums 2T + 2A"
|
||||||
|
)
|
||||||
|
controller.element_dialog.confirmed.emit()
|
||||||
|
controller.element_dialog.hide()
|
||||||
|
_check(
|
||||||
|
combo_marker.get_element_caption() == "2T+2A+SEQ",
|
||||||
|
"the confirmed marker stores a structured sequence"
|
||||||
|
)
|
||||||
|
_check_approx(
|
||||||
|
controller.get_element_catalog().get_segment_base_value(combo_marker),
|
||||||
|
4.60,
|
||||||
|
"the structured sequence has the summed base value"
|
||||||
|
)
|
||||||
|
_check(controller.undo(), "the structured sequence can be undone")
|
||||||
|
|
||||||
controller.help_button.pressed.emit()
|
controller.help_button.pressed.emit()
|
||||||
_check(controller.help_dialog.visible, "help button opens the help dialog")
|
_check(controller.help_dialog.visible, "help button opens the help dialog")
|
||||||
_check(
|
_check(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue