Merge develop into feature/50-upload-soundtrack
Build / test (pull_request) Successful in 2m3s
Build / build (pull_request) Skipped

The API spec is now formatted like before (2-space indents, sorted keys):
develop's spec with the upload paths and types added, so the diff to
develop is only the upload API.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SansanandClaude Opus 5.5 committed 2026-10-16 11:29:18 +02:00
commit 8263781abc
20 files changed
+5661 -45

No files matched your search

+1 -1
View File
@@ -226,7 +226,7 @@ func test_click_on_top_bar_while_quiz_popup_is_open_only_closes_it() -> void:
func test_sync_disables_quiz_buttons_until_finished() -> void:
_server.respond_bytes("/sync", PackedByteArray())
_server.respond_json("/sync/progress", {"progress": 10, "time_spent": "00:00:01"})
_server.respond_json("/sync/progress", {"progress": 10, "time_spent": "00:01"})
var sync_popup: BasePopup = _window.get_node("SyncPopup")
_top_bar_button("SyncButton").pressed.emit()
+23 -4
View File
@@ -10,6 +10,8 @@ var _window: Control
func before_test() -> void:
_snapshot = AutoloadSnapshot.take([Settings])
Settings.currently_syncing = false
# The bar jumps to its values and the result shows at once
Settings.reduce_animations = true
_server = FakeHttpTransport.new().install()
_server.respond_bytes("/sync", PackedByteArray())
_runner = scene_runner("res://popups/SyncPopup.tscn")
@@ -38,7 +40,7 @@ func _empty_result() -> Dictionary:
"soundtracks_changed_content": [],
"soundtracks_removed": [],
"catched_errors": [],
"total_time": "00:00:03",
"total_time": "00:03",
}
@@ -64,12 +66,29 @@ func test_start_sync_does_nothing_while_already_syncing() -> void:
func test_progress_updates_progress_bar() -> void:
_runner.invoke("start_sync")
_server.respond_json("/sync/progress", {"progress": "42", "time_spent": "00:00:12"})
_server.respond_json("/sync/progress", {"progress": "42", "time_spent": "00:12"})
_runner.invoke("_on_sync_timeout")
assert_float(_node("SyncProgressBar").value).is_equal(42.0)
assert_str(_node("SyncTime").text).is_equal("00:00:12")
assert_str(_node("SyncTime").text).is_equal("00:12")
func test_finished_sync_fills_the_bar_before_the_result() -> void:
Settings.reduce_animations = false
_runner.invoke("start_sync")
var bar: AnimatedProgressBar = _node("SyncProgressBar")
assert_bool(bar.indeterminate).is_true()
_finish_sync(_empty_result())
assert_bool(_node("ProgressHBoxContainer").visible).is_true()
await await_millis(int(Anim.SLOW * 1000) + 100)
assert_float(bar.value).is_equal(100.0)
assert_bool(_node("ProgressHBoxContainer").visible).is_true()
await await_millis(int(Anim.SLOW * 1000) + 100)
assert_bool(_node("ProgressHBoxContainer").visible).is_false()
assert_str(_node("SyncTitleLabel").text).is_equal("Sync Result")
func test_finished_sync_shows_only_sections_with_changes() -> void:
@@ -88,7 +107,7 @@ func test_finished_sync_shows_only_sections_with_changes() -> void:
assert_bool(_node("NoChangesLabel").visible).is_false()
# Header plus one label per soundtrack
assert_int(_node("SoundtracksAddedVBox").get_child_count()).is_equal(3)
assert_str(_node("SyncTime").text).is_equal("Total time: 00:00:03")
assert_str(_node("SyncTime").text).is_equal("Total time: 00:03")
assert_bool(Settings.currently_syncing).is_false()
await assert_signal(_window).is_emitted("sync_finished")
+4
View File
@@ -48,6 +48,9 @@ const STYLES: Dictionary = {
"PlayerTime": "Label",
"PlayerIcon": "Button",
"UpdateButton": "Button",
"SyncProgressBar": "ProgressBar",
"SyncProgressBarFill": "Panel",
"SyncProgressBarText": "Label",
"ProgressSlider": "HSlider",
"VolumeBar": "HSlider",
"StatisticsCard": "PanelContainer",
@@ -67,6 +70,7 @@ const STYLES: Dictionary = {
## Theme types that only scripts read from, so they are not styles a node can pick.
const CODE_ONLY_TYPES: Dictionary = {
"Palette": ["backdrop", "first_point", "match_point", "flash"],
"SyncProgressBar": ["shine"],
"ScoreGraph": [
"player_1", "player_2", "player_3", "player_4", "player_5", "player_6", "player_7",
"grid", "axis_text", "winning_line",