Add read-only game and league regulations to editor 0.5.2 (by Codex)
OBW Editor / editor (linux-x64, ubuntu-24.04) (push) Canceled after 0s
OBW Editor / editor (macos-arm64, macos-14) (push) Canceled after 0s
OBW Editor / editor (windows-x64, windows-2022) (push) Canceled after 0s
OBW Editor / release (push) Canceled after 0s

This commit is contained in:
Codex committed 2026-10-23 06:28:12 +02:00
1 parent 221478b629
commit 9f1928bd9e
27 files changed
+993 -22

No files matched your search

+11 -1
View File
@@ -127,7 +127,17 @@ def main():
click(1378, 153) # Leagues; its row opens the competition editor.
first_property('competitions', 'comp:demo', 'League Comparison')
assert tool('editor_info')['dirty'] is False
print('Native RmlUI edit, search, undo/save and sorted player/team/league comparison passed.')
before_rules = tool('editor_info')
click(100, 509) # New read-only Regulations page.
click(475, 232) # Game rules.
click(325, 232) # Leagues & competitions.
click(650, 233); x('type', '--clearmodifiers', 'League')
time.sleep(.2); x('key', 'ctrl+a'); x('key', 'BackSpace')
rules = tool('editor_regulations', {'competition': 'comp:demo', 'language': 'en'})
assert rules['read_only'] is True and len(rules['items']) == 1
assert rules['items'][0]['movement_defined'] is False
assert tool('editor_info') == before_rules
print('Native edit, search, undo/save, sorted comparisons and read-only regulations passed.')
except Exception:
log.flush()
print((root / 'app.log').read_text())